Title: Shortcode insert, WP-topbar not showing
Last modified: August 21, 2016

---

# Shortcode insert, WP-topbar not showing

 *  Resolved [miraculics](https://wordpress.org/support/users/miraculics/)
 * (@miraculics)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/shortcode-insert-wp-topbar-not-showing/)
 * Hi,
 * I’m trying to insert in PHP option (AFTER the TopBar is generated) a shortcode,
   in preview I can see the topbar, but on the site the topbar is not showing.
 * The code I use is: echo do_shortcode(‘[displayAdzone id=”1″]’);
 * The site is [http://syscon.ro/airport](http://syscon.ro/airport)
 * CAn you help me please with this issue ?
 * Kind regards,
    Danut
 * [http://wordpress.org/plugins/wp-topbar/](http://wordpress.org/plugins/wp-topbar/)

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

 *  Plugin Author [rfgoetz](https://wordpress.org/support/users/rfgoetz/)
 * (@rfgoetz)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/shortcode-insert-wp-topbar-not-showing/#post-4506625)
 * Try this:
 * `echo preg_replace("/\r\n|\r|\n/",'',do_shortcode('[displayAdzone id="1"]'));`
 * Bob
 *  Thread Starter [miraculics](https://wordpress.org/support/users/miraculics/)
 * (@miraculics)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/shortcode-insert-wp-topbar-not-showing/#post-4506670)
 * Dear Bob,
 * Thanks a lot, but the problem is still persisting.
 * Kid regards,
    Danut
 *  Plugin Author [rfgoetz](https://wordpress.org/support/users/rfgoetz/)
 * (@rfgoetz)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/shortcode-insert-wp-topbar-not-showing/#post-4506755)
 * Try this (replaced double quotes with single quotes):
 * `echo preg_replace("/\r\n|\r|\n/",'',do_shortcode("[displayAdzone id='1']"));`
 * or
 * `echo preg_replace("/\r\n|\r|\n/",'',do_shortcode("[displayAdzone id=\"1\"]"));`
 * Bob
 *  Plugin Author [rfgoetz](https://wordpress.org/support/users/rfgoetz/)
 * (@rfgoetz)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/shortcode-insert-wp-topbar-not-showing/#post-4506921)
 * Try v. 5.21.. I re-wrote the jquery such that you no longer need to do the “echo”
   command.
 * This will work on its own:
 *  echo do_shortcode(‘[displayAdzone id=”1″]’);

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

The topic ‘Shortcode insert, WP-topbar not showing’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-topbar_706d6d.svg)
 * [WP-TopBar](https://wordpress.org/plugins/wp-topbar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-topbar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-topbar/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-topbar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-topbar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-topbar/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [rfgoetz](https://wordpress.org/support/users/rfgoetz/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/shortcode-insert-wp-topbar-not-showing/#post-4506921)
 * Status: resolved