• Resolved graham333

    (@graham333)


    Hi folks,

    I have spent hours farting about with this myself but to no avail, so I thought I would ask here before giving up.

    I’m using the 2012 Default Theme with Child Theme.

    Home page is a static page (Page)
    All content is in Categories (5) and Posts (50)
    Site is under construction and 503’d using the Maintenance plugin
    Other plugins installed:
    Remove Category URL
    Automatic Featured Image Posts

    Question is this:

    Is it possible to display the main horizontal nav menu (Categories and Posts) on the Home page ONLY, and nowhere else?

    I have tried adding the various code snippets to both the parent and child themes found here and on other sites but none of them seem to work on this theme.

    Can anyone help or provide a solution please?

    I’m not a coder so please make any answers foolproof i.e. tell me where stuff goes! thanks ??

Viewing 15 replies - 1 through 15 (of 27 total)
  • Tahoerock

    (@tahoerock)

    Hi graham333,

    1) install Reveal ID plugin
    – go to pages and you should see ID of every page there

    Then:

    2) put this code to your Child Theme style.css file
    OR
    Install Simple Custom CSS plugin and put the code there.

    .page-id-2 .nav-menu {
        display: none;
    }
    
    or
    
    .page-id-2 .nav-menu {
        display: none!important;
    }

    Change the No. 2 for any number you have in your Pages IDs

    Here is some talking about this issue on another post concerning different Themes, but can give you glue how it is working.

    Hope this will be helpful.
    Let me know you have it worked out. It worked on my site.
    If not…..
    Let us know the link to your site so we can work it out for your case.
    Cheers
    TR

    Thread Starter graham333

    (@graham333)

    Thanks for trying to help tahoerock.

    I have tried this code already both in the parent and child style.css alternately just in case, It does not work, the nav bar is still present.

    I have already read the post you refer to above as well,

    Remember I want the navbar ON the HOME page only and disabled for ALL category pages and posts.

    From what I understand the call to the navbar in the header.php is this…


    <nav id="site-navigation" class="main-navigation" role="navigation">
    <button class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></button>
    "><?php _e( 'Skip to content', 'twentytwelve' ); ?>

    <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?></nav>
    <!-- #site-navigation -->

    I cannot link to my site it’s 503’d at present but the Theme is just the standard Default 2012

    Thread Starter graham333

    (@graham333)

    Sorry if I messed up here I put that code above in HTML tags because I don't know what a backtick is (do they mean a backslash (\)?

    Tahoerock

    (@tahoerock)

    when you put some code here you hit the code button above twice, at the bigining and end of the code.

    Thread Starter graham333

    (@graham333)

    Ah right, It would be very helpful to all I’m sureif it actually said that instead ??

    Tahoerock

    (@tahoerock)

    Hi graham333

    put this code to your Child Theme style.css file
    OR
    Install Simple Custom CSS plugin and put the code there.

    .nav-menu {
        display: none;
    }
    
    .home .nav-menu {
        display: block!important;
    }

    It is working here on my site, with 2012 theme.cI installed that for testing purposes
    Let me know if this is working
    Cheers
    TR

    Thread Starter graham333

    (@graham333)

    Nope, sorry tahoerock this does not work either.

    I tried it in both the parent and child theme and the header.php

    Thread Starter graham333

    (@graham333)

    … and just to note I did clear the browser cache.

    Tahoerock

    (@tahoerock)

    u do not need to mess up with header.php
    that code is intended to put to child theme style.css file or as I wrote above.
    Do not know, how come it does not work,
    Im having same code here, 2012 installed and see menu just on homepage, rest is gone
    TR

    Thread Starter graham333

    (@graham333)

    Weird,

    As a further test, I have just installed the 2012 theme on my local machine added the code to the parent style.css and it still doesn’t work for me, all the menus are still there??

    Tahoerock

    (@tahoerock)

    can u send me url of you site?

    Thread Starter graham333

    (@graham333)

    Not at present, its under construction and in maintenance mode I don’t want any Search Engine crawlers in there at the moment.

    I’m trying to figure out why it is working for you, but will not work on a completely unmodified default version of the theme on my local <scratching head>)

    Thread Starter graham333

    (@graham333)

    tahoerock are you testing with categories and posts or Pages?

    Tahoerock

    (@tahoerock)

    pages

    Thread Starter graham333

    (@graham333)

    Aha, do you think could you test it with some test categories and posts if you have a minute to spare, just to make sure I’m not going mad ??

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Hide/Remove 2012 Theme Navbar Except for Home page’ is closed to new replies.