Community Forums › Forums › Archived Forums › General Discussion › Repositioned Nav Bar
Tagged: Navigation Bar, quotes, syntax, unclosed link
- This topic has 8 replies, 3 voices, and was last updated 10 years, 11 months ago by
MompreneurMedia.
-
AuthorPosts
-
May 29, 2014 at 4:41 pm #107377
MompreneurMedia
MemberHello,
I followed Studiopress' instructions on repositioning a navigation bar. It worked and the nav bar is where I want it to be. The problem I am having now is that the content on the homepage is now clickable links.
Any Idea how I can fix this?
Thanks in advance
http://draft.mompreneurmedia.com/May 29, 2014 at 8:53 pm #107401carroc
MemberSounds like a missing tag or something. Can you share your functions file for a review?
If you back out the snippet you added, does the hyperlink problem go away?
~Carleigh
Genesis Lover Skype Group
http://carleighrochon.comMay 29, 2014 at 10:03 pm #107414MompreneurMedia
MemberThank you Carliegh!
This is the code I added. When I remove it everything goes back to normal but then the nav bar isn't where I need it to be. Any ideas?
//* Reposition the secondary navigation menu
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
add_action( 'genesis_before_header', 'genesis_do_subnav' );Nicole
May 29, 2014 at 11:40 pm #107419Tom
ParticipantHi Nicole,
The quote characters in your code snippet are incorrect/unmatched. By replacing the leading single quote I was able to make your snippet work in Sample theme.
When copying code from a page you should always visit the 'raw' page to ensure you get all of the code and paste directly into your php file.
Good:
' U+0027 apostrophe (ambidextrous)Not good:
‘ U+2018 left single quotation mark
’ U+2019 right single quotation mark
Choose your next site design from over 350 Genesis themes.
[ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ]May 30, 2014 at 1:00 pm #107539MompreneurMedia
MemberThank you Tom!
This is the code I got from the Studiopress site raw code: It says not to use the opening php tag.
<?php
//* Do NOT include the opening php tag
//* Reposition the secondary navigation menu remove_action( 'genesis_after_header', 'genesis_do_subnav' ); add_action( 'genesis_before_header', 'genesis_do_subnav' );Here is an image of where the tag was added. Does it look correct to you?
Nicole
May 30, 2014 at 1:17 pm #107542Tom
ParticipantIt looks well-placed in the file (eg. no php tag) but I can't tell from an image if the characters are correct 🙂
The point is that the code is incorrect as pasted into your file. You should:
Remove the code, save and verify the site is correctly rendered.
Go back to the RAW snippet from the StudioPress page, copy and paste directly into functions.php.
Save and test again. You could also try placing the code at the bottom of the file.At the risk of more cut and paste, you could post your functions.php at http://pastebin.com/ or similar. I'd also like to know what editor you are using for these mods - perhaps it is modifying your pasted code. <?>
Choose your next site design from over 350 Genesis themes.
[ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ]May 31, 2014 at 12:27 am #107582MompreneurMedia
MemberHi Tom,
I followed your steps using http://pastebin.com/ and Notepad++. Still not successful.
I appreciate all of your help. Any other ideas?
Kindly,
NicoleMay 31, 2014 at 1:30 am #107590Tom
ParticipantCan you post your functions.php at pastebin and provide the link here so we could look at the exact code?
Please also remove the code menu relocation snippet from the live site. (leave the menu in the original position)
However, I think that moving the menu just reveals differently a problem with the coding of your header logo and link.
I think the real problem is that this anchor link is not closed, as can be seen in this HTML output:
<a href="http://www.draft.mompreneurmedia.com/"><img src="http://draft.mompreneurmedia.com/wp-content/uploads/2014/05/header.png" alt="Mompreneur Wellness"><div class="avenue-after-header-wrap"><div class="avenue-after-header widget-area">
Where is the closing
a>
? - the link just extends through the remainder of the page. Fix your header logo and link and you 've fixed your problem
Choose your next site design from over 350 Genesis themes.
[ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ]May 31, 2014 at 11:22 am #107639MompreneurMedia
MemberThat did the trick. Thank you so much Tom!!
-
AuthorPosts
- The topic ‘Repositioned Nav Bar’ is closed to new replies.