• Resolved Murky Red

    (@murky-red)


    Hello,

    Could it be possible to help me with some coding? This is the shortcode that I use in a widget for a sidebar: [mp3-popout tracks=”FEED:LIB” autoplay=”y” tag=”h3″ text=”LAUNCH AUDIO PLAYER”]

    I would like to use this in the wp-topbar, but I am not sure if I can copy-paste it in the same format. Also, I am also not very sure about where to put it exactly: html? php?

    I would also like to have the social media icons aligned right (right above the menu), and the link to the popout player aligned to the left.

    You can see the link of the popout player right below the slider. I would like to show it in the same way in the topbar, so that I can delete the one in the sidebar.

    I prefer to be advised before I will do something that I will regret, certainly php is quite new to me 🙂

    Thank you very much!

    http://www.murkyred.com/wordpress/

    https://wordpress.org/plugins/wp-topbar/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Bob

    (@rfgoetz)

    Two questions.

    Regarding the shortcode: try this in a PHP option:

    echo do_shortcode(‘[mp3-popout tracks=”FEED:LIB” autoplay=”y” tag=”h3″ text=”LAUNCH AUDIO PLAYER”]’);

    Regarding how to align it, you will have to add CSS IDs to the above code and then style it with your Theme’s CSS. I have not tried this, but this may work:

    echo ‘<span id=”myspecialid”>’.do_shortcode(‘[mp3-popout tracks=”FEED:LIB” autoplay=”y” tag=”h3″ text=”LAUNCH AUDIO PLAYER”]’).'</span>’;

    Bob

    Thread Starter Murky Red

    (@murky-red)

    Hi Bob, thanks for your answer!

    First of all: I have put the settings of the text/image back to ‘center’ with no padding on the right, as the alignment of the social icons showed nice on desktop but on the ipad it was completely messed up.

    Regarding the shortcode: I added your suggestion in the ‘before’ option in the php. It appears in the topbar now, but it doesn’t do anything, no launch of the player. Also the popout icon of the player is completely on the left, but the text ‘launch audio player’ is in the middle. I was also hoping that the link of the popout player should appear next to the icons, not below or above, as it does now.

    I did not try your second option yet regarding the alignment, as I don’t know exactly what I have to enter in the “myspecialid”. But first I’ll have to get that player working.

    Thread Starter Murky Red

    (@murky-red)

    Update: I changed the settings and disabled the ‘fixed’ position, because the topbar hides too much of the menu and with logo.
    Now I’ll need to find a way that the menu always remains visible, because it always disappears when the topbar appears when scrolling.

    I will also change the header back to it’s theme settings, because right now it looks quite ugly.

    I would like to get that topbar showing the popout player and the icons next to each other, so that at least it shows everything on one line which will decrease the bar’s height.

    Maybe I ask too much, but I am really a novice in php. It seems so complicated compared to html… :-)))

    Thank you already very much for your efforts. Your plugin is a great one.

    Thread Starter Murky Red

    (@murky-red)

    Update: I changed the settings and disabled the ‘fixed’ position, because the topbar hides too much of the menu and with logo.
    Now I’ll need to find a way that the menu always remains visible, because it always disappears when the topbar appears when scrolling.

    I will also change the header back to it’s theme settings, because right now it looks quite ugly.

    I would like to get that topbar showing the popout player and the icons next to each other, so that at least it shows everything on one line which will decrease the bar’s height.

    Maybe I ask too much, but I am really a novice in php. It seems so complicated compared to html… :-)))

    Thank you already very much for your efforts. Your plugin is a great one.

    Plugin Author Bob

    (@rfgoetz)

    In reading all of this, the plugin can support what you want. It will require custom PHP and CSS.

    I apologize though, I just don’t have the bandwidth to help you work through these specific issues. I suggest that you post on a job board for some specific help.

    Best wishes.

    Plugin Author Bob

    (@rfgoetz)

    Closed – no response in a week.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Using shortcodes’ is closed to new replies.