SHORTCODES are only parsed when using the_content() to display the page data.
This was a problem as I was pulling the page data into a variable and then echoing $page->post_content. No worries. Once I added the loop code around the page
if (have_posts()) : while (have_posts()) : the_post();and
endwhile; endif;the_content() AND my short codes worked fine!
Hurray! Wordpress can be a pain, but this was easy!
Links:
http://www.smashingmagazine.com/2009/02/02/mastering-wordpress-shortcodes/
http://codex.wordpress.org/Shortcode_API
http://themocracy.com/2010/03/a-flickr-badge-using-wordpress-shortcodes/
No comments:
Post a Comment