• Hello there!

    I’m new to WordPress and i would like to know if there is a way, to grab the content of a post WITH the shortcodes so i can check if a shortcode is included in my post’s content.
    i want to make something like this:

    $content = “the full content of a post with the shortcodes”;
    if(strpos($content, ‘<!–:EN–>’) == true) { print the english flag }
    if(strpos($content, ‘<!–:IT–>’) == true) { print the italian flag }

    Any help will be appreciated!

  • The topic ‘Check which shortcodes are in my content’ is closed to new replies.