WordPress.org

Ready to get started?Download WordPress

Forums

how to make homepage point to 'Home' menu item (2 posts)

  1. jeffreywong777
    Member
    Posted 1 year ago #

    I have created a home.php that displays all posts. What I wish is that when I click on the 'Home' menu item, it will return to this homepage. However, it does not and instead, go to another Home page. Please help me with the code. I post here excerpt of the wp_nav_menu code.

    <?php
                  $main_menu = array(
    				 'theme_location' => 'header-menu',
    				 'container' => ' ',
    				 'container_class' => 'nav',
    				 'container_id' => 'header-menu',
    				 'echo' => false,
    				 'fallback_cb' => ' ',
    				 'items_wrap' => '<ul id=\"%1$s\" class=\"%2$s\">%3$s</ul>',
    				 'depth' => 0,
    				 ); ?>
    			  <?php if (is_home( ))?>: <a href="<?php echo home_url( );?>"></a>
                  <?php wp_nav_menu( $main_menu ); ?>

  2. noahjonah
    Member
    Posted 1 year ago #

    Set your new "page-template" as the new frontpage.
    Settings->Reading->there you go:)

Topic Closed

This topic has been closed to new replies.

About this Topic