WordPress.org

Forums

trying to edit my main navigation but can't find it in WP (26 posts)

  1. rhender
    Member
    Posted 3 years ago #

    Hello,

    I'm trying to edit my main navigation menu.

    My contact page is returning a Not Found 404.

    Here is the HTML that is displayed in the code for the navigation.

    <nav id="access" class="menu" role="navigation">
    
    <ul>
      ... page links here
      </ul>
    </nav>

    Could anybody point me in the direction of where I could find the navigation, so that I could edit it.

    Am I missing something very obvious / crucial?

    EDIT: OK, never mind on one part of that. The <nav> is in my header.php file. But for some reason my contact page won't come up, even though it is in that Navigation code in the header. I have no idea..

  2. Pioneer Web Design
    Member
    Posted 3 years ago #

    Menus are constructed using the menu options in WP....why are you trying to edit a file for such?

  3. rhender
    Member
    Posted 3 years ago #

    Well, a lot of this site that I am working on was custom coded, I guess you could say.

    The navigation is coded into the header.php file.

    It's a fairly simple site with the following links:
    Home
    Contact Us
    Services (with Dropdown menu)
    Discounts
    Blog

    For some reason the Contact Us page is not being found.

    There were templates created for the contact page, the blog, ... Services Page - no template - but has some crazy SEO javascript stuff going on, and Discounts falls under the default template.

    I just can't figure out why the contact page is not being found. Like it's not on the server at all, but I feel like it is...

  4. Peter Wooster
    Member
    Posted 3 years ago #

    Just to clarify what @SwansonPhotos said. The Appearance/Menus in admin lets you define custom menus. Once you do that you can edit the menu from there.
    /peter

  5. Peter Wooster
    Member
    Posted 3 years ago #

    If it's hard coded in the header.php, you will need to edit it there; yuck. To determine why the contact page isn't found use a web development tool like Firebug or Safari's Web Inspector to see what is being generated.

    Can you get to the page by entering its url in the browser address bar?

    /peter

  6. rhender
    Member
    Posted 3 years ago #

    Ok, thanks Peter.

    Yeah, right now when I click on the appearance > menus
    it says the following

    The current theme does not natively support menus, but you can use the “Custom Menu” widget to add any menus you create here to the theme’s sidebar.

    It was a custom theme created for the site, and the navigation was all coded into the header. I'm just baffled why I can't find the contact page, as it has a template, and the link seems to be fine, when I look at its URL when I view it under "Pages"

    So I don't know... thanks for at least talking to me.. helps me generate ideas.

  7. rhender
    Member
    Posted 3 years ago #

    Yeah when I enter its URL in the browser bar, it still says page not found.

    http://my-site/contact

    = 404 not found... darnit

  8. Peter Wooster
    Member
    Posted 3 years ago #

    What does the link in the menu look like in the page source in the browser? What is its permalink value when you view it in 'edit page'?

    Is the site available online for me to look at?

    /peter

  9. rhender
    Member
    Posted 3 years ago #

    From source code...

    <li><a href="http://thesite.com/subfolder-name/contact">Contact Us</a></li>

    and then from the permalink when I view it in 'edit page'
    http://thesite.com/subfolder-name/contact

    I have to put filler names in there, because I don't want the client to be able to trace back to the link unfortunately.

  10. Peter Wooster
    Member
    Posted 3 years ago #

    That looks correct, but without access to the real site it's hard to diagnose. You'll have to puzzle it out or contact the author.

    Good Luck/peter

  11. rhender
    Member
    Posted 3 years ago #

    Yeah, I know. Thanks for your help Peter.

    If there was instant messaging, maybe I could send you a link to the site.

    ...or email, if you feel like helping me.

  12. rhender
    Member
    Posted 3 years ago #

    It's like it's not finding the template or something. That's my only guess really.

  13. Pioneer Web Design
    Member
    Posted 3 years ago #

    There should be no sub-folder name, it is either a category or a parent page. Read up on permalinks in WP and site structure.

  14. rhender
    Member
    Posted 3 years ago #

    The only reason there is a subfolder name is because I have it on my testing site.

    I basically set up a testing version of the real site, so that I could do edits without affecting the live site.

    I have a testing site, with multiple sub folders, each corresponding to a different website... unavailable to search engines... strictly for developing.

    Not ideal... I think soon I want to just start developing locally, once I figure out how to do it.

    I'm just in a hurry with this project, and don't have the time to learn how to do it.

  15. Pioneer Web Design
    Member
    Posted 3 years ago #

    Unfortunately, you will find many cannot adjust their own schedules to dig so deep into such an issue...

  16. rhender
    Member
    Posted 3 years ago #

    Haha. Yeah I understand. Back into the wilderness.

  17. Peter Wooster
    Member
    Posted 3 years ago #

    Have you checked your .htaccess to ensure it's working?

  18. rhender
    Member
    Posted 3 years ago #

    ooh... thanks Peter.

    Yeah, I'm not too familiar with the .htaccess file

    I don't even really know what it's saying, but I could maybe post a copy of what's in it? if you're still around?? don't know if that is a security risk for my site or not...

    I did look at it, but could not really understand what it is saying quite yet. I'll look at it again right now, and make sure it's even uploaded to my test site for starters.

    EDIT: well, it's definitely uploaded already, I just need to figure out what it is saying now, and if it is correct for my testing site. Would it have needed to be changed, since the URLs are different now? That may be what is causing me problems.

    Because there is also a video that is supposed to be on the homepage, but is not there on my test site, and that is bothering me as well... hmmm..... need to understand the .htaccess file better as I know it is very important for configuration of a site,

  19. esmi
    Forum Moderator
    Posted 3 years ago #

    The standard WordPress .htaccess file is quite generic and posting it should not create any security risk.

  20. rhender
    Member
    Posted 3 years ago #

    ...just edited my last post esmi

    I doubt it still has the standard settings in the .htaccess file.

    This site has been through a few developers' hands.

    my .htaccess file...

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
  21. esmi
    Forum Moderator
    Posted 3 years ago #

    The permalinks part of a WordPress .htaccess file hardly varies from site to site. Even if the file contain multiple custom rewrite rules, publishing them will not create a security problem. All we are after is the block that starts with # BEGIN WordPress and ends with # END WordPress.

  22. rhender
    Member
    Posted 3 years ago #

    Did you see that I added it - the .htaccess file - to my last post esmi?

  23. esmi
    Forum Moderator
    Posted 3 years ago #

    That .htaccess file looks fine. Check with your hosts that mod_rewrite is running on your server.

  24. rhender
    Member
    Posted 3 years ago #

    GoDaddy says they have that running by default with all Linux hosting accounts... so I don't think that is it.

    What is a php.ini file?

    I have one of those in there, but I don't think it is affecting anything as far as I can tell...

  25. Pioneer Web Design
    Member
    Posted 3 years ago #

    It needs to be named php5.ini and then once created properly go to your hosting account (the php.ini file is what to start with):
    Content>System Resources>End Web
    and the server will pick up your php5.ini file which you can verify by creating a phpinfo.php5 file in the root (web hosting root, not site root, unless they are the same) also, and then navigating to it with your browser. It should simply contain this:

    <? phpinfo(); ?>

    Once done testing remove the phpinfo.php5 file.

  26. rhender
    Member
    Posted 3 years ago #

    Ok, thanks...

    So would that possibly have anything to do with one of my navigation links not working...

    and a video on the homepage not displaying?

    Basically it seems like I have some link problems... not many... but just a couple - ....after I copied the live site to my testing location.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.