I develop a new theme for wordpress 3.3.1 from scratch and shortcodes are not working on it.
As I searched until now it is a matter of filtering the content containing the shortcode, filter code added in a theme specific location(shorcodes are working with another theme).
So, my question is : What is the code for a general shortcode theme enable ?
Leave a Reply
You must be logged in to post a comment.
To execute a single shortcode, run it with
If the shortcode(s) are in the post content, make sure you’re displaying it with
Or
Or
The important thing is: if you aren’t using the function “the_content()” you need this line
<?php echo apply_filters('the_content',$wp_query->post->post_content);?>
where in the second argument you have to put the variable of the post content you want to show.I had to save the theme’s content to a variable and then use the second example.. Worked like a charm.