Register Shortcode in Functions for Custom Posts
-
Hello
On our website, we not only use the standard WP posts, but we also have four custom type posts for our content.
Because the tables do not pull through to the custom post types, I would like to register the shortcode in our custom theme functions file.
I noticed and read in your documentation on your own site where you have the query instructions to add to the theme files. That would work, but our problem is if we use that method of output, the chart would have to fall in the same place in every custom post. The line would be dictated by where I place it in the theme file.
I would prefer to register the shortcode in functions.php so that it would work in the custom theme wherever we choose to put the shortcode in the content.
Also, the shortcode needs to output the correct table, as every post would have a different table.
Could you please help in letting me know which “add shortcode” to put in the theme’s function.php.
Thank you so much
- The topic ‘Register Shortcode in Functions for Custom Posts’ is closed to new replies.