Community Forums › Forums › Archived Forums › General Discussion › Adding widget under header right navigation on Academy Pro
Tagged: academy pro, header right, header widget
- This topic has 8 replies, 3 voices, and was last updated 6 years, 6 months ago by tanyaslogos.
-
AuthorPosts
-
March 31, 2018 at 3:15 pm #218502tanyaslogosMember
Hello! I hope that everyone is having a wonderful Saturday!
I am trying to add a widget box under the header navigation in the Academy Pro theme. I commented out the removal of the header widget on line 216-217 and tried changing the position number on line 275 but no matter what I do the widget remains above or beside the navigation.
I tried moving it with CSS and failed there too. I know I am missing something elementary but darn if I can figure it out.
If anyone can help me I would greatly appreciate it.
Thank you in advance!
TanyaMarch 31, 2018 at 6:40 pm #218509ErikaParticipantHi Tanya,
This post will help get you back on track: https://isaiahdesign.co/after-header-widget-genesis/
Let me know how it goes!
March 31, 2018 at 8:40 pm #218513tanyaslogosMemberThank you Erika! I really appreciate you taking the time to help me. 🙂
That is a great tutorial - unfortunately my problem isn't adding the widget box it has more to do with positioning it.
When I comment out the removal of the original "header right widget" it adds the header widget code before the navigation code on the right side of the header.
I want the code to display under the navigation - not above it.
I tried changing the position number on the navigation but it moves it everywhere but above the header right widget box. lol
Anywhoooo I am going to fiddle with it some more and hopefully I will find the magic number. 🙂
Thanks again and I hope you have a great Holiday weekend!
TanyaApril 1, 2018 at 12:19 am #218515Brad DaltonParticipantI would use a 3rd parameter of 5.
Line 274 of functions.php, change the 12 to 5 like this :
add_action( 'genesis_header', 'genesis_do_nav', 5 );
Based on my testing, that puts the header right widget area after the nav menu in the header.
Then you'll need to add CSS yourself which will vary depending on the widget you add in header right.
April 1, 2018 at 9:23 pm #218538tanyaslogosMemberHello Brad,
Thank you so very much! I am sorry for the delay in getting back to you - Easter snuck up on me like some demonic bunny rabbit and bashed me in the head! lol
I had tried that ( actually I tried every number between 1 and 15 lol )
When I comment out the "remove header-right widget" on line 216 and add the number 5 to line 274 I get this order.
Navigation
Title
WidgetWhat I was trying to achieve was
Title
Navigation
WidgetI guess my OCD is getting in my way. LOL
Anywhooooooo I really appreciate you taking the time to help me. One of these days I am going to master this PHP stuff. Not any time in the near future apparently but someday! LOL
THANKS AGAIN! YOU ARE THE BEST!
TanyaApril 1, 2018 at 10:26 pm #218539Brad DaltonParticipantApril 2, 2018 at 11:33 am #218557tanyaslogosMemberHmmm how very weird....
This is what I get lol - I think the PHP Gods love you!
I have tried moving it over with CSS but nothing seems to want to scooch it over. Ehhh
¯\_(ツ)_/¯
April 18, 2018 at 1:29 am #219065Brad DaltonParticipantFollow up on this. Did you get this worked out?
Now you need to use CSS to position it to the right. The PHP is correct but it doesn't position like CSS.
June 7, 2018 at 9:09 pm #220655tanyaslogosMemberHello Brad, Nope I gave up. LOL
I tried to reposition it with css but it wouldn't budge.
No biggy I worked around it. 🙂
Thanks for following up though! I appreciate your help!
Tanya
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.