• Resolved RebeccaInMI

    (@rebeccainmi)


    I am working on this site using the Freshy 2 theme for WordPress. It is still a work in progress but here is the site:

    https://www.fightingspiritsafety.com

    As you can see I have links to the programs offered, tuition info, an F.A.Q., the owner’s bio, testimonials, welcome (the homepage), and speaking engagements. I would like to change the order so that “Welcome” is the first link listed, but I can’t figure out how to change it. Do I need to find and change something in one of the PHP files? I’m not good with PHP so if that’s the case, a hint regarding what to look for in which file would be spiffy.

Viewing 15 replies - 1 through 15 (of 20 total)
  • Thread Starter RebeccaInMI

    (@rebeccainmi)

    As you can see, I’ve got some custom menus on the right sidebar. I don’t see how a custom menu can control the links at the top of the page, however. Could you enlighten me?

    Try adding your new custom menu to the top nav.

    Thread Starter RebeccaInMI

    (@rebeccainmi)

    I’m learning as I go, so please bear with me if I sound like I’m being dense. Where do I go in the Dashboard to add a custom menu to the top nav? If I go to Appearance >> Menus WordPress tells me

    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.

    I’ve looked all over in the Dashboard and I can’t find a way to control the order of those links at the top.

    Is the top nav widget-aware?If so, you can add a custom menu via Appearance->Widgets.

    Thread Starter RebeccaInMI

    (@rebeccainmi)

    It seems that all I can control is the sidebar on the right. I’ve literally looked everywhere in the Dashboard and can’t find a way to control the menu at the top. I’m thinking the top nav is not widget-aware?

    What code is generating the top nav in header.php?

    Thread Starter RebeccaInMI

    (@rebeccainmi)

    OK, if I go to Appearance >> Editor and select header.php from the list of template files, here is the complete file. Like I said I’m not good with PHP so I can’t really tell which part of that is controlling the navigation bar.

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Thread Starter RebeccaInMI

    (@rebeccainmi)

    Sorry about that. Like I said, I’m learning as I go, and I guess that goes for the forum too!

    How do I get something from the pastebin into a post?

    Thread Starter RebeccaInMI

    (@rebeccainmi)

    Thanks, esmi. I hope this works. This should be the header.php file for the Freshy 2 theme.

    https://pastebin.com/XHNi7fV3

    The theme appears to be using <?php wp_list_pages('sort_column=menu_order&title_li='); ?> to generate the top nav links. However, have you created a static front page?

    Thread Starter RebeccaInMI

    (@rebeccainmi)

    Yes the site has a static front page. I went to Settings >> Reading and selected the “Welcome” page to be the page that viewers see when they first come to the site.

    If you just want to change the order of your main menu links, i would seriously doubt you need to be adjusting your code.

    Try opening up one of your pages (like you’re going to update it normally) and see if there’s a little box to the right that reads “page attributes” then look for a little box that says “Order”.

    The page with the lowest order number is on the left. To change the order, just assign the number you want from 0 to 10 and the lowest numbers should show left in the menu.

    See if that works.

    Yes the site has a static front page.

    In that case, you can use the the solution suggested by Joe Shaw. The menu is generated slightly differently if you have your recent posts on your front page.

    One qualifier: Joe suggested numbering from 0 to 10. I normally recommend that you use 0, 10, 20, 30 etc. That way, it’s very easy to insert a link between 2 others later on – without having to change the Page Order numbers on any existing Pages.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘How do I control the order of the links to pages on a site?’ is closed to new replies.