Community Forums › Forums › Archived Forums › General Discussion › Header Widget All Pages Except Index
Tagged: BLOX Lite for Genesis, header widget
- This topic has 5 replies, 3 voices, and was last updated 7 years, 3 months ago by
markajh.
-
AuthorPosts
-
December 28, 2018 at 6:40 pm #225286
markajh
ParticipantUsing Gallery Pro. I am using the "Image Widget" in the "Before Header" drop down.
I would like the image to appear on every page EXCEPT the index page.
I assume there is code to write to place on the functions.php page? I don't know what that code would be or how to write it.
Am I on the right track or not? Can anyone please help.
Thanks, Mark
December 28, 2018 at 9:44 pm #225296Victor Font
ModeratorPlease post a link to your site so we can see what you're doing.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?December 29, 2018 at 8:51 am #225309markajh
ParticipantHere is a link to the site: http://atomic-training.com/wp-admin
I created a UN/Login for you - the PW was sent to your [email protected] address. Editor Level. Please let me know your thoughts.
January 4, 2019 at 5:05 am #225407wikilistia
MemberHello Markajh
I think this can be done if you create multiple pages. You can paste the code of header widget on every page and remove the header widget code from the index page.
Regards
Alka JacobJanuary 6, 2019 at 9:16 am #225432Victor Font
ModeratorHi Mark,
I'm sorry, but I don't access wp-admin areas as a community volunteer. I reserve that level of support for my paying clients.
Besides, all I was asking is for a link to the site. There is code you can add to functions.php to hide a widget from the front page. You have to use WordPress conditionals. https://codex.wordpress.org/Conditional_Tags
The idea is to hook into one of the WordPress or Genesis actions to test whether your on the front page of not, then if you're on the front-page, hide the widget. If you aren't, then let it display.
With Gallery Pro, you can try adding the conditionals to the function that displays the widget. Find this code around line 110 in functions.php:
function bbs_before_header_widget() { genesis_widget_area( 'before-header', array( 'before' => '<div class="before-header">', 'after' => '</div>', ) ); }Now, add the conditionals:
function bbs_before_header_widget() { if !( is_front_page() || is_home() ) { genesis_widget_area( 'before-header', array( 'before' => '<div class="before-header">', 'after' => '</div>', ) ); } }
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?January 6, 2019 at 9:49 am #225436 -
AuthorPosts
- The topic ‘Header Widget All Pages Except Index’ is closed to new replies.