Forums

Amend and add to WordPress Nav bar.. (29 posts)

  1. timsharpphotography
    Member
    Posted 1 year ago #

    Hi everyone..

    I have had a good search through the support forums and can't find an answer to my question.

    I have recently started to use my wordpress site a lot more for my photography. I now want to be able to change the names of the Menu titles on the top nav bar and also I want to be able to add and remove menu items to the bar.

    My wordpress site is http://www.timsharpphotography.com/

    So for example on the top menu I want to change the menu title named 'category' to 'Portfolio' then I want to add another menu item called 'Photography' with the ability to add and link to blog pages I have created within my existing blog.. Can anyone help please? I cannot ask the author of the theme as I have the free version and you have to pay for support.

    Lastly I want to know how to remove items from the top menu, I would possibly like to remove the search section.

    Thanks in advance,
    Tim

  2. t-p
    Member
    Posted 1 year ago #

    you would need to look in your header.php file in your theme first and determine if your theme uses wp_list_pages or wp_nav_menu to display the menu?

    wp_list_pages would require a link to be coded in.

    wp_nav_menu you would use the menu creator (in admin) in WP to make a link or rename a link.

  3. timsharpphotography
    Member
    Posted 1 year ago #

    Thanks for your reply

    I haven't got either of those lines in my header.php..

    I have tried the menu creator in Admin and it says:

    '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.'

  4. govpatel
    Member
    Posted 1 year ago #

    What theme is it as its possible to make it custom menu feature
    friendly.can you paste your header.php in http://wordpress.pastebin.com and put the url here

  5. timsharpphotography
    Member
    Posted 1 year ago #

    Thanks for getting back to me.. really appreciate the help. It's an early free version of Modularity by Graph Paper Press.

    Here's the header.php:

    http://wordpress.pastebin.com/pYvQLwrK

  6. govpatel
    Member
    Posted 1 year ago #

    I see that you are using include tag for your menu
    <?php include (TEMPLATEPATH . '/nav.php'); ?>

    so your menu would be in nav.php

    Do you have a functions.php file as that is where you need to add code to make your theme use custom menus feature and make some change in nav.php

  7. timsharpphotography
    Member
    Posted 1 year ago #

    Hi, yes I do have a nav.php.. pasted below

    http://pastebin.com/bFA7rrYp

    Function.php below also..

    http://pastebin.com/7k8Kaz0t

    Could you possibly help with what exactly I would need to change to add/remove and amend please?

  8. govpatel
    Member
    Posted 1 year ago #

    Ok I need have my dinner and I will try and add codes needed and paste them back give me about an hour.

    One thing is that when you use custom menu feature you will have to add your pages and posts category manually by dragging and position them as you like and save menu so let me know if that is ok before I make any changes.

  9. timsharpphotography
    Member
    Posted 1 year ago #

    I'm assuming you mean I would have to redo all my menu bar menus via the custom menu feature in the admin console? That's fine as long as I can add/remove and amend that would be fantastic.. currently the custom menu feature does nothing as I think the theme is over riding those settings?

    Thank you very much. There is no rush at all so please enjoy your weekend and help when you have time.

  10. govpatel
    Member
    Posted 1 year ago #

    Is there any way you can send me the whole theme so that I can test out on my test site I use skype if you do you can send it I have my skype on my website click on my name.

  11. govpatel
    Member
    Posted 1 year ago #

    First make a copy of functions.php and nav.php and save them just in case you have to load them back.

    I have made changes on those files in pastebin copy the top part replace the respective file and save.

    now click on Appearance Menus and see if you have a
    menu header with a dropdown in theme location box.

  12. timsharpphotography
    Member
    Posted 1 year ago #

    Hey matey..

    I'm probably being stupid but the nav and functions file I see on pastebin are exactly the same as the ones I already have? I've not used pastebin before am I looking at the wrong part? I am looking at the top half..

    I also requested to add you on Skype so I can send you the template.

    Cheers,
    Tim

  13. govpatel
    Member
    Posted 1 year ago #

    Make copy of booth files before you make changes.

    I did add the codes required and its not there any more.

    in functions.php all you need is add

    add_theme_support( 'menus' );

    just after <?php

    and in nav.php

    you need take everything out

    after ?>
    Replace with this

    <div id="nav">
    <?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'container_class' => 'menu-header' ) ); ?>
    </div>

    Then go to Appearance Menus and see if you have a menu in top left box.

  14. timsharpphotography
    Member
    Posted 1 year ago #

    Hi thank you..

    I have amended the nav and functions menus.. all I have on my site is my About menu on the top bar now which I created as a normal page.

    When I go to Appearance>Menus I have the same screen as before amendments. If I try and add a custom menu it creates it and then says this on the left hand side.

    "Your theme supports 0 menus. Select which menu appears in each location."

  15. timsharpphotography
    Member
    Posted 1 year ago #

    Photo of appearance menu:

    http://www.picupine.com/5a145d7x

    Photo of appearance menu after adding a custom menu:

    http://www.picupine.com/9091e14x

  16. govpatel
    Member
    Posted 1 year ago #

    Is there any way you send me the theme folder using skype so that I can work on it find where the problem is.

  17. timsharpphotography
    Member
    Posted 1 year ago #

    I have tried to add you on skype.. I think it's awaiting you to authorise me. My name on sykpe is beardedfats

    Alternatively I can email you the theme folder.

    Thanks again.

  18. govpatel
    Member
    Posted 1 year ago #

    I just added you and I will not be my computer this evening

  19. govpatel
    Member
    Posted 1 year ago #

    I have checked and you will need to change the names in nav.php as you wanted that can be done.

    let me know what names and what you want to take out and I will make changes and paste the file in paste bin.

  20. timsharpphotography
    Member
    Posted 1 year ago #

    Hi there,

    I wanted the following menus on the Navbar if possible, weirdly when I removed all the other menus by deleting the code as suggested above I am left with a solo link to a page I created via the admin pages console named 'about, will all future pages created from the admin console pages section appear on the menu by default?

    Home
    About
    Gallery
    Services
    Prices
    Contact

    I then need the ability to add pages under these menus.

    Thanks,
    Tim

  21. govpatel
    Member
    Posted 1 year ago #

    When you create pages as is now they are going under Pages as submenu as how theme template is written all can do the change the names in menu so you want to change
    Categories to say Portfolio then in nav.php

    <li class="drop"><span>Categories</span>

    you can do same any menu headers

  22. timsharpphotography
    Member
    Posted 1 year ago #

    Ok thanks, I'd like to go with the way you suggested if possible please. If you can show me by creating a nav file with the menus above I should be able to make any future changes myself.

    Once I have the menus above on the nav bar how do I get any new pages to be included under each specific menu?

  23. govpatel
    Member
    Posted 1 year ago #

    Look for this code in style.css

    #content {
    margin:0 280px 0 20px;

    Change it to

    #content {
    margin:auto;

    this move all your content to center.

  24. timsharpphotography
    Member
    Posted 1 year ago #

    I'm completely lost to be honest.. sorry.

    That code above looks like it's moving the menu about which I didn't want to do?

    All I wanted to do was create the custom menus below on the top Nav bar and then assign WordPress pages and categories to the menus somehow.

    Home
    About
    Gallery
    Services
    Prices
    Contact

    Sorry I think we have crossed messages :)

    Thanks
    Tim

  25. timsharpphotography
    Member
    Posted 1 year ago #

    So I have worked out that changing:

    <li class="drop"><span>Categories</span>
    to
    <li class="drop"><span>Services</span>

    changes the top menu name which solves one problem. As I can possibly use the in built categories menu once renamed for my services menu.

    I still need to create other custom menus in the nav.php menu and then somehow get other created pages from within my blog to link inside those.

    So for example I need a menu named Gallery pointing with the ability to add pages within linking to pages I have created within WordPress.

    Hope this makes sense?

    Tim

  26. timsharpphotography
    Member
    Posted 1 year ago #

    Ok got a bit further.. I have now worked out how to an additonal menu..

    So if I wanted this new menu to list 'only' particular pages I have created, what would I change? I'm assuming you can adjust the following and tell it to either hide pages or include only particular pages?

    <?php wp_list_pages('orderby=name&depth=-1&title_li='); ?>

    Additionally what would I change on the code below to include or exclude categories from the menu?

    <?php wp_list_categories('orderby=name&depth=-1&title_li='); ?>

    Thanks,
    Tim

  27. timsharpphotography
    Member
    Posted 1 year ago #

    So found out to hide is &exclude=pageid, so is there an include 'only' command rather than exclude?

    Edit: Found it.. include= quite obvious really I guess!

    Almost there with the menus.. just need to work out how to create a Home page menu button now I think and also how to move all my menus over to the left a little?

    Any ideas?

  28. govpatel
    Member
    Posted 1 year ago #

    You will find the information here on how to do it

    http://codex.wordpress.org/Function_Reference/wp_list_pages

  29. timsharpphotography
    Member
    Posted 1 year ago #

    Superb thank you..

Topic Closed

This topic has been closed to new replies.

About this Topic