Forums

Suggestions on creating a site which displays different menus (15 posts)

  1. John Hoff
    Member
    Posted 10 months ago #

    I'm creating a training site which will include lots of free video training, no membership required.

    For example, I might include training on WordPress, then training on Blogging, Marketing, SEO etc. I'd also have a blog on the site.

    What I'd like to do is use the theme OptimizePress to deliver the video training, but here's my issue...

    If someone were to click to view the WordPress training (just an example), then I want the horizontal menu to show, say WordPress 101, WordPress 201, 301, etc. But then if they clicked from the sidebar to view the SEO training, then the horizontal menu would read SEO 101, 201, 301, etc.

    I was thinking WP multisite but now I'm thinking this might be best accomplished with plugins.

    As for the blog, it would not use the OptmizePress theme; more like StudioPress or something.

    Any suggestions?

    Thanks

  2. John Hoff
    Member
    Posted 10 months ago #

    Not been successful in toying with it and searching online. Anyone have any ideas?

    Should I just install multiple installs of WordPress in each directory and then is there a plugin where I can do a multiple WordPress install combined search?

    Thanks

  3. deepbevel
    Member
    Posted 10 months ago #

    You can hard code menus in the nav area of your header, you have to remove the code which creates the dynamic menu.

    this is a long thread where two other members and myself struggled with not only adding multiple menus, but styling each differently. It works.

  4. deepbevel
    Member
    Posted 10 months ago #

    here's the basic idea, 2 condtional menus:

    replace this:

    <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>

    With:

    <div id="access">
    
    <?php if (is_page('page-slug')) { ?>
    
    <ul>
    <li class="current-menu-item-red">
    <a href="http://www.yoursite.com">home</a>
    <li class="green">
    <a href="http://www.yoursite.com/about_us">about us</a>
    <li class="blue"><a href="http://www.yoursite.com/contact_us">contact</a>
    </ul>
    <?php }?>
    
    <?php if (is_page('page-slug')) { ?>
    
    <ul>
    <li class="current-menu-item-red">
    <a href="http://www.yoursite.com">home</a>
    <li class="green"><a href="http://www.yoursite.com/about_us">some-page</a>
    <li class="blue"><a href="http://www.yoursite.com/contact_us">some-other-page</a>
    </ul>
    <?php }?>
    
    </div>

    note use of conditionals to specify which of the 2 pages show which menu.

  5. haxxxton
    Member
    Posted 10 months ago #

    do you mean a menu like

    http://pwarch.com.au/

    a horizontal submenu?

  6. deepbevel
    Member
    Posted 10 months ago #

    yes, seems that woud be easier and accomplsh the same.

  7. haxxxton
    Member
    Posted 10 months ago #

    for any sort of sub menu stuff.. better to stick with your back end functionality and implement something like superfish to do all the hard work for you..

    similarly plenty of cool css tricks and tips for nested menus at listamatic2

    :)

  8. John Hoff
    Member
    Posted 10 months ago #

    @deepbevel - cool stuff. I will look into that if I don't find the answer haxxxton mentioned.

    @haxxxton - That site's menu style wasn't what I had in mind, but I like it a lot and definitely could use that. So superfish or listamatic2 would be the direction to investigate to get those menus then? It would be implemented on OptimizePress.

    Thanks guys. I really appreciate the help.

  9. deepbevel
    Member
    Posted 10 months ago #

    here's a way to get different wp custom menus without having to hard code the links.

  10. John Hoff
    Member
    Posted 10 months ago #

    Nice! Thank you. I'll give it a try.

  11. deepbevel
    Member
    Posted 10 months ago #

    this code was in my header:

    <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>

    so I did this:

    <?php if (is_page('page-one')) { ?>
    <?php wp_nav_menu( array( 'container_class' => 'menu-header','menu' => 'Custom 1', 'theme_location' => 'primary' ) ); ?>
    <?php }?>

    I added the page-condtional, and also added:

    'menu' => 'Custom 1',

    to the array, Custom one is the name of my custom menu.

    it works!

  12. John Hoff
    Member
    Posted 10 months ago #

    Cool. Do you have a link where I can see it in action?

  13. deepbevel
    Member
    Posted 10 months ago #

    here I have a different menu for the page "test"

    code looks like this:

    <?php if (is_page('test')) { ?>
    <?php wp_nav_menu( array( 'container_class' => 'menu-header','menu' => 'Custom 1', 'theme_location' => 'primary' ) ); ?>
    
    <?php } else{ ?>
    <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
    <?php }  ?>
  14. deepbevel
    Member
    Posted 10 months ago #

    currntyly trying to get it to show 2 at once, one below the other.

  15. deepbevel
    Member
    Posted 10 months ago #

    blah, sometimes I can't see what I type. Anyway I gave up trying to get 2 menus but I managed to locate adapt some of the style elements
    for the custom menu, while leaving the default as is. It's been the most difficult css wrangle I've attempted, but maybe i'll learn something. So far I can change the nav bar and link colors anyway.
    If you need to do anything like this i may be able to help some, but I have a feeling I'm doing it the hard way, as ussual.

Reply

You must log in to post.

About this Topic

Tags

No tags yet.