Hi @hube2 , I’m just using the tag description out of box for posts but only adding an acf custom field to it.
The acf field is just a text field with simple html code, because I wanted to show a featured image there. This can be achieved by using other plugins but I wanted to use acf in case I want to add more than images in the future. I was surprised to know I had to tell acf the term_id because I thought acf shortcodes would work inside tag_descriptiion the same as it would inside post_content.
Hi @hube2 thank you so much. It works! In post content and if I want to render an acf shortcode, I don’t need to specify the post ID and it works flawlessly. I was wondering if it is a way to get the current term_id without manually adding it. My situation is that I have many tags in my old site.
Again, thank you for great help.
Hi @hube2 thank you. I tried that solution before posting here.
I’m not sure about category description but in tag description, other shortcodes work just fine without any modification made to the functions.php. Only acf shortcodes are not working and that was why I asked for help here.
Sorry for the confusion. Please see the screenshot and I hope it would help better understand my situation.
In short, I created a group field and a text field for all tags. Then I populated the text field and inserted the acf shortcode to the tag description area.
Screenshot: https://ibb.co/S7g5D9x
Thank you so much!
Can any power user @hube2 help?
Thank you @andisaleh , I added it to my site but the acf shortcode is still not rendering.
I also added
add_filter('tag_description', 'do_shortcode');
add_filter( 'term_description', 'do_shortcode' );
but nothing seems to work so far.
Thank you!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.