Adding an automatic shortcode to a custom post type

Hey. Question. I’m using a custom post type in Wordpress and want to have the X social sharing icons appear at the bottom of every post.

I already have this going on with normal posts due to an earlier adjustment to the functions.php file, yet I’m wondering how to make this happen with the custom post, notably, the ‘Timeline’ posts from a particular plugin

Hi Peter,

Thank you for writing in,

You can actually use that same method, you just need to change the function name, and the is_singular('post') to is_singular('timeline') or whatever singular name of your custom post.

More info about is_singular() function.

Hope it helps,
Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.