I looked at some code for an article and saw that there was a shortcode contained in a <p> tag:


The shortcode doesn't seem to work. Could it have anything to do with that it's contained in the paragraph tag?


No. Wrapping a tag around a shortcode won't prevent the function from executing.


In your page template, you may have to call do_shortcode() on the_content() inside your loop:

<div class"your-content>
    <?php do_shortcode( the_content() ); ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.