• I am using get_post to pull content from pages to show on my front page template. I am using multiple instances of “if have posts, get posts” and calling an id number to a particular page. However, with this method none of the formating comes along. Also, things like short codes do not function either, everything just shows up as text.

    Is there a way to make the content from get_post to show up corectly?

    here is the test bench for the site:

    http://hct.nathanbuchanan.com

    Specifically I am trying to get some short code working in the “Core Values” section of the front page which is content I am pulling from the “Core Values” page found in the main menu

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter nathan_buchanan

    (@nathan_buchanan)

    Anyone have any answers to this? Id like to try to get this site up and working today if I can.

    Thread Starter nathan_buchanan

    (@nathan_buchanan)

    Really need some help with this ASAP.

    Did you ever find a solution to this? I would be interested in an answer as well.

    Lots of themes seem to dismiss short codes on the front page which is odd IMO. (i.e) Many users would like to be able to pull posts into their front pages via short codes.

    Sorry I can’t provide a solution 🙁

    Just wrap the content echo with a do_shortcode function:
    <?= do_shortcode($post->post_content); ?>

    Sorry its taken someone so long to answer this question.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Getting shortcode to work when using get_post outside the normal loop’ is closed to new replies.