Forums

[resolved] How do I control the order of the links to pages on a site? (21 posts)

  1. RebeccaInMI
    Member
    Posted 9 months ago #

    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:

    http://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.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 9 months ago #

  3. RebeccaInMI
    Member
    Posted 9 months ago #

    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?

  4. esmi
    Theme Diva & Forum Moderator
    Posted 9 months ago #

    Try adding your new custom menu to the top nav.

  5. RebeccaInMI
    Member
    Posted 9 months ago #

    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.

  6. esmi
    Theme Diva & Forum Moderator
    Posted 9 months ago #

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

  7. RebeccaInMI
    Member
    Posted 9 months ago #

    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?

  8. esmi
    Theme Diva & Forum Moderator
    Posted 9 months ago #

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

  9. RebeccaInMI
    Member
    Posted 9 months ago #

    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]

  10. RebeccaInMI
    Member
    Posted 9 months ago #

    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?

  11. esmi
    Theme Diva & Forum Moderator
    Posted 9 months ago #

  12. RebeccaInMI
    Member
    Posted 9 months ago #

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

    http://pastebin.com/XHNi7fV3

  13. esmi
    Theme Diva & Forum Moderator
    Posted 9 months ago #

    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?

  14. RebeccaInMI
    Member
    Posted 9 months ago #

    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.

  15. Joseph Shaw
    Member
    Posted 9 months ago #

    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.

  16. esmi
    Theme Diva & Forum Moderator
    Posted 9 months ago #

    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.

  17. Joseph Shaw
    Member
    Posted 9 months ago #

    That's a good suggestion. 0 10 20 30 40 50 - keeps you from having to renumber anything if you later insert a new page.

  18. esmi
    Theme Diva & Forum Moderator
    Posted 9 months ago #

    It's an old programming trick from the days when you had to number each line of code. :-)

  19. Joseph Shaw
    Member
    Posted 9 months ago #

    Yeah - I hate to say I'm one of those old programmers. Though, I've been out of that business for a while. I used to do COBOL for big government systems and natural adabase, but those jobs are all but gone these days.

  20. RebeccaInMI
    Member
    Posted 9 months ago #

    Oh my gosh, I feel like such a moron!! It was right there all the time and I just didn't see it because I was looking for something more complicated. *facepalm* Thank you both!!!

  21. Joseph Shaw
    Member
    Posted 9 months ago #

    LOL - No worries!

    "You Don't Know, What You Don't Know".

    If you don't know there's an easy way, it's kinda hard not to take the hard way.

    :-)

Reply

You must log in to post.

About this Topic