• Hi
    First, thumbs up for you work! I used insert_php since about a year and half. since I began this project on my work.

    I am trying to convert all my code, but my first attempt I am getting crazy with it… it a bad start to me 🙁

    I have a snippet that displays only when user is logged in. In this case it works with old style:

    [loggedin]Welcome [insert_php] echo get_currentuserinfo()->display_name;[/insert_php] [/loggenin]

    converting in a snippet, just displays the snipped code like ex: “[wbcr_php_snippet id=”416”

    ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author webcraftic

    (@webcraftic)

    Hi,
    Use this code in the snippet and paste it through the shortcode!

    echo do_shortcode('[loggedin]Welcome '.get_currentuserinfo()->display_name.'[/loggenin]');

    Best regards, Alex

    Thread Starter vkosta

    (@vitorkosta)

    ohh… ok.
    but this means to me to move the page content to snippet, it will work, but for me at this point it will be not so easy manageable if I need to update text content :-/ for example.
    because I have more complex content were I have inside text [loggedin] [loggedout] shortcode to show or not, and with [PHP]
    with [insert_php] is more easy readable, but there are always to faces on a coin 🙂

    thans anyway

    Plugin Author webcraftic

    (@webcraftic)

    Hi,

    You can named to the snippet as you understand it. I do not see cases where the problem would be difficult to solve.

    Can you show me what kind of content you have and what is the difficulty of placing snippets in it?

    My email: [email protected]

    Best regards, Alex

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘“PHP code snippets” inside other’ is closed to new replies.