• Resolved ceaventures

    (@ceaventures)


    I need to create a page to be used as a landing page. I do not want the menu to show up. I created a new page template and copied the code from my default template

    <?php
    /*
    Template Name: Landing Page
    */
    ?>
    <?php get_header(); ?>

    <?php nectar_page_header($post->ID); ?>

    <div class=”container-wrap”>

    <div class=”container main-content”>

    <div class=”row”>

    <?php if(have_posts()) : while(have_posts()) : the_post(); ?>

    <?php the_content(); ?>

    <?php endwhile; endif; ?>

    </div><!–/row–>

    </div><!–/container–>

    </div>
    <?php get_footer(); ?>

    I need to know what code I insert to disable the menu.
    I found this code but don’t know where to insert it:

    .header {display:none;}
    #navmenu {display:none;}

    my site is teamrzrck.com and I use a the theme called Salient

Viewing 3 replies - 1 through 3 (of 3 total)
  • catacaustic

    (@catacaustic)

    You don’t need to do that, and doing it by using CSS to hide the menu could cause more SEO issues then you’d think about (Google doesn’t like hidden text, and likes it even less when they’re hidden links).

    What you should do is to copy header.php to another file, and call it something like header-nonav.php. In that new file, remove the navigation menu which will probably be a call to wp_nav_menu() somewhere in that file. Remove that part from that new header file and save it.

    Then edit your template file and use this:

    <?php get_header('nonav'); ?>

    This will bring in the correct header file.

    Thread Starter ceaventures

    (@ceaventures)

    thanks! that worked perfect!!

    Thread Starter ceaventures

    (@ceaventures)

    ok, so now I want to remove the body of the footer from that same template. I want to leave the copyright bar but get rid of the widgets. I tried the same steps. I copied the footer.php and titled it footer-nofoot.php. I then set <?php get_footer(‘nofoot’); ?> on the template but none of the changes i make in the nofoot file affect my page at all. It seems like the template is still pulling from the normal footer file.

    Any suggestions???

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘create landing page template with no navigation’ is closed to new replies.