• Resolved stephenm

    (@stephenm)


    Hi there…..when i create a php snippet and add a shortcode it wont work see below….eg: <?php echo do_shortcode(“[my_shortocde]”); ?>

    hope you can help.

    S

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @stephenm,

    How are you loading the snippet after adding the code you mentioned?

    If the snippet is active and the code doesn’t output anything it may be that the shortcode you are trying to use is not registered.

    Is the shortcode you are trying to use registered in a plugin or another snippet?

    Thread Starter stephenm

    (@stephenm)

    Hi Mircea…..does it have to be recognised scripts?? i was simply trying to output in the php snippet the follwing <?php echo “hello”; ?> which outputs nothing!!

    any ideas?

    Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @stephenm,

    No, that code should output hello, as expected. Where are you inserting the code? Is the rest of the snippet content being output correctly?

    Can you try using code type Universal to see if that works? That’s better for snippets where you have HTML and PHP mixed.

    Thread Starter stephenm

    (@stephenm)

    ok tried using the universal snippet and that works!!

    thanks for your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘php snippet not showing’ is closed to new replies.