Support » Plugin: WP-TopBar » [Plugin: WP-Topbar] Top bar only on home page

  • Resolved sipswierstra

    (@sipswierstra)


    Hi,
    The plug-in works very well. However I am left with a question I have not been able to find an answer for.

    I want the top-bar only to show on the home page with the recent posts. What is the page number I should specify. “0” display on all pages.

    Thanks a lot for providing the community with this wonderful plugin

    Sip

    http://wordpress.org/extend/plugins/wp-topbar/

Viewing 3 replies - 1 through 3 (of 3 total)
  • It totally depends on what your home page is… you can use WordPress to point to any page. The easiest means of finding out is to mouseover the ‘edit’ button in Admin and look at the link displayed. Within the URL, you’ll see the page id listed.

    One note on this… the plugin is written a bit strange where it actually puts the div within the <head> tags. I was able to overcome this by:

    1. Changing the published div to <div id="topbar">
    2. Adding the following CSS to my style sheet: `#topbar {
      position:fixed;
      top: 0;
      padding: 0;
      margin: 0;
      width: 100%;
      z-index: 99999;
      }`
    3. Adding a margin to the top of my page to incorporate the bar.
    4. Changing the last wp_head command in the Actions and Filters to wp_footer

    Now the topbar loads from the bottom of the page using CSS. This avoids the head issue and keeps the content well down the page so it won’t influence search.

    Thanks douglaskarr for sharing this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP-Topbar] Top bar only on home page’ is closed to new replies.