[Plugin: WP-TopBar] Find page ID of homepage
-
First off, great plugin – very user friendly.
I’d like to have the top bar show up on my homepage only. I’m currently using a theme where I edit the homepage outside of WP’s pages/posts section. I can’t find any page ID. I’ve viewed the source and searched for post= but can’t find anything.
As a work-around, I’ve tried to exclude all other pages using your settings. Though for some strange reason today, the bar won’t display on my homepage but will on the other 2 pages I have it set to show on.
Any ideas? Thanks.
Greg
-
Be tinkering around and somewhat stumped. Thought I’d let you know what I attempted. I tried to cut back on some settings to see if I could get the bar to appear on the homepage as it previously workedk. No matter what I do, the code is not being populated into the homepage (verified by viewing source).
Steps I’ve taken:
Disabled/Enabled plugin
Set “Including Page IDs” back to “0” and page exclusion to “No” (essentially the default settings)
Kept “Enable Cookies” set to No – also cleared my cache/cookies and tried multiple browsersI don’t use any custom CSS.
Greg
Hmmm…
Send me a link to your page (where the TopBar shows up). With that also include the CSS/HTML that shows up on the Debug tab.
You have tried Deleting settings and restarting? That deletes the settings from your database and recreates it with default settings.
In the next release (3.10), I have setup a way to include/exclude by Category. Not sure that will help in your situation. 3.10 will come out after I validate it works with the upcoming 3.4 release of WordPress.
I can see about adding a selection criteria around including/exclude home page. That may not make 3.10.
Bob
Hi Bob,
Thanks for the response. The website can be found here.
If you go to the Plans page, you’ll see the top bar.
WP-TopBar Debug Mode: in wtpb_check_for_plugin_upgrade
WP-TopBar Debug Mode: Version 3.09
WP-TopBar Debug Mode: end of wtpb_check_for_plugin_upgrade
WP-TopBar Debug Mode: Server Timezone:UTC
WP-TopBar Debug Mode: Current Time :1339073390-2012-06-07 12:49:50 (UTC)
WP-TopBar Debug Mode: Starting Time:0-0-1970-01-01 00:00:00 (UTC)
WP-TopBar Debug Mode: Ending Time :0-0-1970-01-01 00:00:00 (UTC)
WP-TopBar Debug Mode: Start Time is zero
WP-TopBar Debug Mode: End Time is zero
WP-TopBar Debug Mode: TopBar will display due to time settings and because it is enabled
WP-TopBar Debug Mode: Cookie Name: wptopbar_0e5c88c321df6c65484749b1b3b4960a
WP-TopBar Debug Mode: Cookie not found
WP-TopBar Debug Mode: Not an iPhone/iPad/iPod Device
WP-TopBar Debug Mode: Filename:/home/rails/wordpress/wp-content/plugins/wp-topbar/lib/
WP-TopBar Debug Mode: ————————————–
WP-TopBar Debug Mode: Using these “wptbAdminOptions” Values:
WP-TopBar Debug Mode: [wptb_version]: 3.09
WP-TopBar Debug Mode: [enable_topbar]: true
WP-TopBar Debug Mode: [topbar_pos]: header
WP-TopBar Debug Mode: [text_color]: #7f7f7f
WP-TopBar Debug Mode: [bar_color]: #ffffff
WP-TopBar Debug Mode: [bottom_color]: #000000
WP-TopBar Debug Mode: [link_color]: #00a5d9
WP-TopBar Debug Mode: [bottom_border_height]: 1
WP-TopBar Debug Mode: [include_pages]: 2, 94, 897, 96, 781, 1021, 108, 103, 106, 111, 678, 674, 537, 725, 663, 979, 98, 666, 776, 756
WP-TopBar Debug Mode: [invert_include]: yes
WP-TopBar Debug Mode: [delay_time]: 5000
WP-TopBar Debug Mode: [slide_time]: 350
WP-TopBar Debug Mode: [display_time]: 0
WP-TopBar Debug Mode: [start_time]: 0
WP-TopBar Debug Mode: [end_time]: 0
WP-TopBar Debug Mode: [start_time_utc]: 0
WP-TopBar Debug Mode: [end_time_utc]: 0
WP-TopBar Debug Mode: [font_size]: 14
WP-TopBar Debug Mode: [padding_top]: 25
WP-TopBar Debug Mode: [padding_bottom]: 25
WP-TopBar Debug Mode: [margin_top]: 0
WP-TopBar Debug Mode: [margin_bottom]: 0
WP-TopBar Debug Mode: [respect_cookie]: ignore
WP-TopBar Debug Mode: [cookie_value]: 1
WP-TopBar Debug Mode: [past_cookie_values]: Array
WP-TopBar Debug Mode: [allow_close]: yes
WP-TopBar Debug Mode: [close_button_image]: https://www.fixmyprintfile.com/wp-content/uploads/2012/06/close4.png
WP-TopBar Debug Mode: [close_button_css]: vertical-align:text-bottom;float:right;
WP-TopBar Debug Mode: [link_target]: top
WP-TopBar Debug Mode: [bar_link]: https://www.fixmyprintfile.com/high-volume-workflow-solution
WP-TopBar Debug Mode: [bar_text]:
WP-TopBar Debug Mode: [bar_link_text]: Need a lower price-per-page for high volume workfows? Click here to learn more.
WP-TopBar Debug Mode: [text_align]: center
WP-TopBar Debug Mode: [bar_image]:
WP-TopBar Debug Mode: [enable_image]: false
WP-TopBar Debug Mode: [custom_css_bar]:
WP-TopBar Debug Mode: [custom_css_text]:
WP-TopBar Debug Mode: [social_icon1]: off
WP-TopBar Debug Mode: [social_icon2]: off
WP-TopBar Debug Mode: [social_icon3]: off
WP-TopBar Debug Mode: [social_icon4]: off
WP-TopBar Debug Mode: [social_icon1_image]: https://www.fixmyprintfile.com/wp-content/plugins/wp-topbar/lib/icons/png/twitter.png
WP-TopBar Debug Mode: [social_icon2_image]: https://www.fixmyprintfile.com/wp-content/plugins/wp-topbar/lib/icons/png/facebook.png
WP-TopBar Debug Mode: [social_icon3_image]: https://www.fixmyprintfile.com/wp-content/plugins/wp-topbar/lib/icons/png/google.png
WP-TopBar Debug Mode: [social_icon4_image]:
WP-TopBar Debug Mode: [social_icon1_link]: https://twitter.com/#!/wordpress
WP-TopBar Debug Mode: [social_icon2_link]: https://www.facebook.com/WordPress
WP-TopBar Debug Mode: [social_icon3_link]: https://plus.google.com/s/wordpress
WP-TopBar Debug Mode: [social_icon4_link]:
WP-TopBar Debug Mode: [social_icon1_css]: height:23px; vertical-align:text-bottom;
WP-TopBar Debug Mode: [social_icon2_css]: height:23px; vertical-align:text-bottom;
WP-TopBar Debug Mode: [social_icon3_css]: height:23px; vertical-align:text-bottom;
WP-TopBar Debug Mode: [social_icon4_css]:
WP-TopBar Debug Mode: [social_icon1_link_target]: blank
WP-TopBar Debug Mode: [social_icon2_link_target]: blank
WP-TopBar Debug Mode: [social_icon3_link_target]: blank
WP-TopBar Debug Mode: [social_icon4_link_target]: blank
WP-TopBar Debug Mode: [div_css]: position:fixed; top: 40; padding:0; margin:0; width: 100%; z-index: 99999;
WP-TopBar Debug Mode: ————————————–
WP-TopBar Debug Mode: Thu, 07 Jun 2012 12:49:50 (UTC)
WP-TopBar Debug Mode: Loading Options
WP-TopBar Debug Mode: Completed Updating Options
WP-TopBar Debug Mode: Version 3.09
WP-TopBar Debug Mode: Displaying Options PageI deleted my settings and re-entered them and the results are the same.
Thanks for your help.
Greg
If you delete the settings and enable the TopBar, does the TopBar show up on the HomePage? (You can change the bar_link and bar_link_text).
Did you try disabling W3 Total Cache (or clearing its cache)? I’ve found that caching sometimes prevents changes from showing up.
You can also hack this to only show up on the homepage. Delete all the include/exclude customizations from the Main Options tab in the Plugin Settings. Then in the file
wp-topbar.php
look for the function:
wptb_inject_TopBar_html_js()
In there add this line (after
global $wp_query;
):
if ( ! is_home() ) { return; }
That will force the TopBar to only show up on the homepage. You’ll also need to make this change in future versions until I can add that feature.
BTW, you also have errors you need to fix in your page:
GET https://www.fixmyprintfile.com/wp-content/themes/epsilon/js/ddaccordion.js?ver=3.3.2 404 (Not Found) /plans/:4
[cycle] terminating; zero elements found by selector 05c6f920.1bf99f.js:103
TPGR: sending feeds info (4) chrome-extension://gimgcofdoijbpkkhhlepagbdcfafkehp/tpgr_cs.js:96
GET https://www.fixmyprintfile.com/wp-content/themes/epsilon/css/images/controls.png 404 (Not Found) 05c6f920.1bf99f.js:3
GET https://www.fixmyprintfile.com/wp-content/themes/epsilon/css/images/border.png 404 (Not Found) 05c6f920.1bf99f.js:3
GET https://www.fixmyprintfile.com/wp-content/themes/epsilon/css/images/loading.gif 404 (Not Found) 05c6f920.1bf99f.js:3
GET https://www.fixmyprintfile.com/wp-content/themes/epsilon/css/images/loading_background.png 404 (Not Found) 05c6f920.1bf99f.js:3Hi Bob,
Yes, if I delete the settings and use the default bar, it works on the homepage.
I have tried emptying the cache. Didn’t seem to make a difference.
I put in the homepage only suggestion. Thanks. Much appreciated.
I’ll also take a look into those page errors.
Greg
Greg, try version 3.10, just updated. It has the options you need on a new Control tab.
Awesome!
Thanks Bob.
- The topic ‘[Plugin: WP-TopBar] Find page ID of homepage’ is closed to new replies.