• Resolved visualadvance

    (@visualadvance)


    Let me see if I can explain this.

    1. In my template I am using this code to display a single post:
    $my_post_id = get_post ($postid);
    $my_content = $my_post_id->post_content;
    echo $my_content;

    2. There is a shortcut inside of the post that I am pulling with the above function. But when I pull that post using the get_post listed above, it gets returned as a string and the shortcode isn’t executed. So when I do the get_post above, it ends up displaying the post as:
    Blah blah blah [my_shortcode_function foo=”bar”] blah blah

    Any clues on how I can modify the get_post call in order to not turn any shortcodes into literal strings?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shortcode Within A get_post’ is closed to new replies.