Forums

Shortcode issue : how to add text BEFORE the shortcode is displayed (3 posts)

  1. aguett
    Member
    Posted 1 year ago #

    Dear All,

    I'm struggling with an issue I have while using shortcodes inside a WP post.

    My problem is the following, let's say I have a blog post with the following content :

    Blah Blah Blah
    [Plugin Shortcode]

    It will ALWAYS display the shortcode FIRST and then "Blah Blah Blah" below.

    How can I get my "Blah Blah Blah" to be first and above the content generated by the shortcode ?
    I tried adding DIV to separate both content but it didn't change anything.

    Thank you very much if you have a solution it would be GREEEEAAAAATTTT !!

    Thanks a lot,

    Ben

  2. alchymyth
    The Sweeper
    Posted 1 year ago #

    do you use a return at the end of the code or echo ?
    (should be return )

    or you could post the code of your shortcode here for someone to look at...

  3. aguett
    Member
    Posted 1 year ago #

    Well I don't know if there is an echo or return at the end of the code because i'm using a plugin I didn't develop.

    Here is an example :

    With the plugin WordPress Page Tree 2.8 :
    Here is my post HTML code :

    BlahBlahBlah
    <code>[pagetree]</code>

    And it displays this on the screen :
    The page Tree
    BlahBlahBlah

    I have the same problem with lots of plugins.

    Hope someone can help.

    Cheers,

Topic Closed

This topic has been closed to new replies.

About this Topic