• https://www.cwws.org website is a customized version of theme 2011 1.3.

    I am using a static page as the home page instead of the blog (customized through settings>reading).

    With the 2011 1.3 theme, when you set a static page as the home page, it does not add an extra unique link (with link name derived from the heading of the page) in the navbar, and it just keeps solely the ‘home’ link active. I like this. I have found that with my other themes, I haven’t been able to figure out how to replicate this.

    It must be something hard coded into the theme, that conveniently allows you to set a static page as the home page without generating a new link in the navbar and just keeps the ‘home’ link active.

    So there is something different going on with the 2011 theme as compared to the theme at https://www.nantucketgiftbasketco.com, where I am going to have to figure out how to change the code to make it act like the 2011 theme.

    Any takers on giving advice to this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The hanami theme does not support custom menus.

    It generates its main menu like this:

    <ul id="mainnav">
      <li class="home <?php if ( is_home()) { echo 'current"'; } else {echo '"'; } ?>><a href="<?php bloginfo('url'); ?>">Home</a></li>
      <?php wp_list_pages('title_li='); ?>
    </ul>

    HTH

    PAE

    Thread Starter wrightj999

    (@wrightj999)

    so your saying we can’t customize the code in the template file? maybe I should find another theme ??

    Yes, you can customise it. Via a child theme, preferably as this is the only recommended way to modify a theme.

    You just have to modify the way the menu is generated. The documentation for wp_list_pages() is here:

    https://codex.www.ads-software.com/Function_Reference/wp_list_pages

    I suggest you start there and try to find a way to exclude the home page from the list it returns.

    Or you could find another theme…

    HTH

    PAE

    Thread Starter wrightj999

    (@wrightj999)

    Nice, that was what I was hoping. Even though I’m not totally sold on this theme, I really really like figuring out how to make things work.

    So, I have to make a child theme. I suppose I should research how to do that. I should be able to search the wordpress codex for that topic correct? And then once I know how to make a child theme, then I can go in and edit it via the information provided by the link you posted.

    Thanks for the direction, much appreciated ??

    Child themes are a breeze:

    https://codex.www.ads-software.com/Child_Themes

    • Create a file called style.css that contains the required comments block and an @import statement to reference your current theme
    • Create a new directory arbitrarily named, but usually named for your child theme, in your installation’s wp-content/themes directory
    • Upload your style.css file to the new directory
    • Go to Dashboard –> Appearance –> Themes and activate your child theme
      A minimal theme just consists of the following (assuming it’s a child of the theme in the wp-content/themes/twentyeleven directory – i.e. it’s a child of the twentyeleven theme):

      /*
      Theme Name: Any arbitrary name
      Template: twentyeleven
      */
      
      @import url("../twentyeleven/style.css");

      Once that file’s in it’s own directory in wp-content/themes it will become available in Dashboard –> Appearance –> Themes and you can activate it. It will look and behave exactly like its parent: twentyeleven in this case.

      After that, just make your style changes in that file (style.css). And if you want to change a template file, copy the parent’s version of the template file you want to modify into your child theme’s directory and make whatever changes you want.

      You can even create an empty file called functions.php and use it to add to or override the PHP functions declared in the parent theme’s functions.php file.

      HTH

      PAE

    Thread Starter wrightj999

    (@wrightj999)

    Wow! Thank you for such a detailed response, I should have all the info I need to implement this now. Very much appreciated ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Modifying a themes navigation links’ is closed to new replies.