• Hi

    I am trying to create a few landing pages for my site that do not have menus on them but cannot figure out a way to do that.

    I had tried a method outlined by Menaka in a previous post but all I get is a blank white page.

    post-8524132

    Barry

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,
    After recent changes in the theme, class name prefixes have changed. Replacing TC_header_main with CZR_header_main might help. Do outline all that you did for further help.

    Thread Starter barrywww

    (@barrywww)

    Hi Menaka

    I appreciate your help.

    I changed the TC-header_main to CZR_header_main in my child functions.php but still all I get when I load the page is a blank page.

    I have created a page called nomenu-page.php. from the Custom-page template.

    Coded as foillows:

    <?php
    /*
    Template Name: LandingPage
    */
    if ( apply_filters( 'czr_four_do', false ) ) {
      do_action( 'czr_four_template' );
      return;
    }
    ?>
    <?php do_action( '__before_main_wrapper' ); ##hook of the header with get_header ?>
    <div id="main-wrapper" class="<?php echo implode(' ', apply_filters( 'tc_main_wrapper_classes' , array('container') ) ) ?>">
    
        <?php do_action( '__before_main_container' ); ##hook of the featured page (priority 10) and breadcrumb (priority 20)...and whatever you need! ?>
    
        <div class="container" role="main">
            <div class="<?php echo implode(' ', apply_filters( 'tc_column_content_wrapper_classes' , array('row' ,'column-content-wrapper') ) ) ?>">
    
                <?php do_action( '__before_article_container' ); ##hook of left sidebar?>
    
                    <div id="content" class="<?php echo implode(' ', apply_filters( 'tc_article_container_class' , array( CZR_utils::czr_fn_get_layout(  CZR_utils::czr_fn_id() , 'class' ) , 'article-container' ) ) ) ?>">
    
                        <?php do_action( '__before_loop' );##hooks the header of the list of post : archive, search... ?>
    
                            <?php if ( have_posts() ) : ?>
    
                                <?php while ( have_posts() ) : ##all other cases for single and lists: post, custom post type, page, archives, search, 404 ?>
    
                                    <?php the_post(); ?>
    
                                    <?php do_action( '__before_article' ) ?>
                                        <article <?php czr_fn__f( '__article_selectors' ) ?>>
                                            <?php do_action( '__loop' ); ?>
                                        </article>
                                    <?php do_action( '__after_article' ) ?>
    
                                <?php endwhile; ?>
    
                            <?php endif; ##end if have posts ?>
    
                        <?php do_action( '__after_loop' );##hook of the comments and the posts navigation with priorities 10 and 20 ?>
    
                    </div><!--.article-container -->
    
               <?php do_action( '__after_article_container' ); ##hook of left sidebar ?>
    
            </div><!--.row -->
        </div><!-- .container role: main -->
    
        <?php do_action( '__after_main_container' ); ?>
    
    </div><!-- //#main-wrapper -->
    
    <?php do_action( '__after_main_wrapper' );##hook of the footer with get_get_footer ?>

    In my fuctions.php file I have the following.

    add_filter('__before_body','remove_header');
    function remove_header($content){
       if (strcmp(basename(get_page_template()),'nomenu-page.php') === 0) {
    
             // Choose one or more of the following FOUR lines based on need
    
           //  remove_action ( '__header', array( CZR_header_main::$instance , 'tc_prepare_logo_title_display' ) , 10 ); // REMOVE TITLE AND LOGO
           //remove_action ( '__header', array( CZR_header_main::$instance , 'tc_tagline_display' ) , 20, 1 );// REMOVE TAGLINE
           remove_action ( '__header', array( TC_header::$instance , 'tc_navbar_display' ) , 30 ); //REMOVE NAVBAR/MENU
    	 //add_filter('tc_header_classes','__return_empty_array');
    
      }
    }

    What I want to do is remove the Menu so that create a standalone Landing Page.

    Regards Barry

    • This reply was modified 8 years, 3 months ago by barrywww.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove Menu – Landing Page’ is closed to new replies.