On a recent project, my customer wanted to display post tags on his blog articles.
Whilst this isn’t an option available in Divi, I have found that by adding some code to your functions.php file, the Tags will display just below the post content.
So, ideally, you are using a Child theme to ensure that you protect your Divi customisation from being overridden by an update. Either way, you should find your functions.php file under Appearance > Editor.
Simply add the code below to the file and jobs a good’un! (remember to always backup your site before you edit php files, just in case 🙂 )
Was this article helpful?
YesNo
Hi ! What css class can we use to have more style ? thanks !
Thanks, Catarina, for this tip, which I used for my Divi Extra blog posts. However, I took a slightly different approach, combining your solution with a code I found on StackExchange to create a post-tag shortcode. I then used the shortcode in the Divi Extra Code module. And this let me choose where to display the tags in the post.
Anyway, I wouldn’t have got as far without your help, so once again, thanks!
I am glad it has worked and I’ve been able to help 🙂
Works great! Thank you
I couldn’t get it to work even with Bill’s code, and with the curly quotes fixed.
It’s probably got to do with the quotes. If you copy-pasted the exact script, go in and remove the quotation marks, then type them in again manually. Sometimes the curly quotes will break the code.
Unfortunately I do not offer support as these were based on my experience at the time of writing. It may be that the newer versions of PHP do not support this code.
Unfortunately I do not offer support as these were based on my experience at the time of writing. It may be that the newer versions of PHP do not support this code.