WordPress.org

Ready to get started?Download WordPress

Forums

WP-TopBar
[resolved] Align PHP with social media and text (3 posts)

  1. mpegler
    Member
    Posted 5 months ago #

    Thank you for the great plug-in. I love how versatile it is.

    I have inserted a shortcode for Google translator in the AFTER PHP portion of the TopBar as follows:

    echo do_shortcode("[google-translator]");

    It works but it inserts it on a new line under the text and social media buttons. Is there a way to have it on the same line or do I need to do the entire banner in PHP?

    The bar is currently not live.

    Thanks

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

  2. Bob
    Member
    Plugin Author

    Posted 5 months ago #

    I don't use that plugin. The plugin adds the AFTER PHP right after the close button.

    It could be that the shortcode [google-translator] is addling line breaks. You might need to parse the output to remove newlines and "</br>" html codes. That would then ensure the output stays on one line.

    (see http://stackoverflow.com/questions/3760816/remove-new-lines-from-string for samples).

    Bob

  3. Bob
    Member
    Plugin Author

    Posted 5 months ago #

    Closing - no response in about a week.

Reply

You must log in to post.

About this Plugin

About this Topic