Community Forums › Forums › Archived Forums › Design Tips and Tricks › Add full width div above the footer widgets Modern Portfolio Pro
Tagged: full width div, Modern Portfolio Pro
- This topic has 8 replies, 2 voices, and was last updated 8 years, 9 months ago by
asbilly92.
-
AuthorPosts
-
June 23, 2016 at 12:13 pm #188164
asbilly92
ParticipantI'm curious in how this was done... how did they get this full width html element (nav) above the footer widgets without using a widget?? I'm talking about the full width nav with the social icons in this site: full width nav element with social icons
I understand how they did the actual 'icons' just how did they get the .nav above the footer widgets? Was it somehow hooked in via code in the functions.php file?
Thank you!
http://www.drbeurkens.com/June 23, 2016 at 1:04 pm #188168Christoph
MemberHi,
yes, the position of the navigation was changed with code in functions.php.
Probably using the hook genesis_before_footer.For code examples, see http://my.studiopress.com/snippets/navigation-menus/#reposition-primary
June 23, 2016 at 1:34 pm #188172asbilly92
ParticipantOh ok YOu, sorry I probably didn't explain my question very well. I do understand that they changed the position of the secondary menu with a hook, but where is the actual code for that menu? I'm sure they used something like:
//* Reposition the secondary navigation menu remove_action( 'genesis_after_header', 'genesis_do_subnav' ); add_action( 'genesis_before_footer', 'genesis_do_subnav', 7 );
Where is the actual code like for the Unordered List? That's the part I'm not getting where's the code for the unordered list with it's list items? Is that code in the functions file as well and how might that look??
June 23, 2016 at 1:46 pm #188176Christoph
MemberIt´s actually the secondary menu.
That´s were all the markup (like the unordered list) is coming from.
http://prntscr.com/bk5u5e
June 23, 2016 at 1:51 pm #188177asbilly92
ParticipantOpps think I figured it out: having some fun experimenting and trid this code below and it worked 😉
Is this ok? Seems to be working. I love trying to figure out how it's done!
function mytheme_add_second_nav() { echo '<nav class="nav-secondary"><div class="wrap">some list items here</div></nav>'; } add_action( 'genesis_before_footer', 'mpp_add_second_nav', 1 );
June 23, 2016 at 1:53 pm #188180Christoph
MemberSure, if you want to hand code all the markup.
I just don't understand why?
If you want to just use an unordered list, no need to use navigation markup...
June 23, 2016 at 2:04 pm #188184asbilly92
ParticipantOk yep I understand totally, the real point of learning for me here was / is to figure out how they hooked that unordered list or nav in the 'specific area' that they did, not as to how they actually coded the menu. Does that make sense? I just couldn't understand how the got any code like that into that spot exactly without using a widget area.
June 23, 2016 at 2:11 pm #188186Christoph
MemberSure thing.
We all learn differently 🙂You can always just echo something on any hook.
If it´s just a line of text or something nobody needs to change (regularly), adding a widget area is probably overkill and echoing directly on the hook more efficient 🙂
June 23, 2016 at 3:50 pm #188194asbilly92
ParticipantYep, fun to learn more for sure! None of my sites get edited at all by anyone but me 😉 so nice to know easy ways to just stick something in!
I appreciate your opinions and help very much! I learn so much from these forums and the Studiopress folk and forums are just super!
-
AuthorPosts
- The topic ‘Add full width div above the footer widgets Modern Portfolio Pro’ is closed to new replies.