• Resolved miba65

    (@miba65)


    I have tried to create a page without header, menu, sidebar and footer.

    This is my code. But it does not want to work with Virtue Theme

    Wass I make wrong can someone help?

    <?php
    /**
    * Template Name: Clean Page
    * This template will only display the content you entered in the page editor
    */
    ?>
    <html <?php language_attributes(); ?> class=”no-js”>
    <head>
    <meta charset=”<?php bloginfo( ‘charset’ ); ?>”>
    <meta name=”viewport” content=”width=device-width, initial-scale=1″>
    <?php wp_head(); ?>
    </head>
    <body>
    <?php
    while ( have_posts() ) : the_post();
    the_content();
    endwhile;
    ?>
    <?php wp_footer(); ?>
    </body>
    </html>

Viewing 15 replies - 1 through 15 (of 15 total)
  • Hello,

    Rather than making a template, this can be achieved via CSS and theme settings.

    If you can link to your page that you’re trying to do this with, I’ll help you with the CSS and any other further instruction that may be required.

    -Kevin

    what does ‘is not working‘ actually mean?

    Thread Starter miba65

    (@miba65)

    @ Michael
    This code does not work with Virtue Theme
    The code at Virtue theme looks like this.
    And here I have the problem how can I change this,
    To show the page without heder, sidebar and footer

    ///page.php///

    <div id=”pageheader” class=”titleclass”>
    <div class=”container”>
    <?php get_template_part(‘templates/page’, ‘header’); ?>
    </div><!–container–>
    </div><!–titleclass–>

    <div id=”content” class=”container”>
    <div class=”row”>
    <div class=”main <?php echo esc_attr( kadence_main_class() ); ?>” role=”main”>
    <div class=”entry-content” itemprop=”mainContentOfPage”>
    <?php get_template_part(‘templates/content’, ‘page’); ?>
    </div>
    <?php global $virtue; if(isset($virtue[‘page_comments’]) && $virtue[‘page_comments’] == ‘1’) { comments_template(‘/templates/comments.php’);} ?>
    </div><!– /.main –>

    Thread Starter miba65

    (@miba65)

    @ Kevin

    I want a page fullwide for description without header, menu, sidebar and footer. It should look like this page

    that can be achieved fairly easy with CSS. if you can link to the page on your site where you want this look, I’ll be happy to give you the CSS.

    -Kevin

    Thread Starter miba65

    (@miba65)

    Hallo Kevin
    thank you for your offer what exactly you need from me
    it is difficult to link this page It is in maintenance mode. I need this for beakend for new page in page attributes on the themplate tropdown menu

    beispiel Bild Theme Auswahl für Neue Seite

    Set the page to be fullwidth template, and then use chrome inspect tool to find the page-id body class once the page it published.

    Then, add this CSS, replacing the page id number with the one you found using the inspect tool:

    .page-id-847 header.banner.headerclass, page-id-847 footer#containerfooter { 
        display: none;
    }

    Let me know if that works for you or if you need any further assistance.

    -Kevin

    Thread Starter miba65

    (@miba65)

    @ Kevin
    And in which css file I have to write this code?

    -Michel

    Sorry, I forgot that part!

    You can add the CSS to Theme Options> Advanced Settings.
    There is a custom CSS box in that area of the theme.

    -Kevin

    Thread Starter miba65

    (@miba65)

    @ Kevin
    I have fixed as described but unfortunately it does not work.

    .page-id-1514 header.banner.headerclass, page-id-1514 footer#containerfooter { 
        display: none;
    }

    What else can I do?
    -Michel

    • This reply was modified 7 years, 10 months ago by miba65.
    Thread Starter miba65

    (@miba65)

    @ Kevin
    It works now half, I had the wrong page id at the first try. now the header is hidden but the footer is still shown
    -Michel

    Try adding the CSS as two difference pieces and let me know if that makes a difference for you:

    page-id-1514 footer#containerfooter { 
        display: none;
    }
    .page-id-1514 header.banner.headerclass { 
        display: none;
    }

    -Kevin

    Thread Starter miba65

    (@miba65)

    @ Kevin
    I have tried trying this variant but it does not work.
    I again look at the code. And try different variants then I found the mistake the dot in front of page-id-1514 footer # containerfooter Was missing.

    With this code it will work now

    .page-id-1514 header.banner.headerclass, .page-id-1514 footer#containerfooter { 
        display: none;
    }
    

    Thanks a lot to you Kevin for your help!

    – Michel

    Ah my mistake, I should’ve caught that.

    Glad you got it working though!

    Let me know if you need any further assistance.

    -Kevin

    Thread Starter miba65

    (@miba65)

    @kevin

    Thank you again for your help.
    At the moment everything is good,
    When I need assistance again.
    I like to ask again thenks.

    – Michel

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Virtue Themes How to create a page without header, menu, sidebar and footer?’ is closed to new replies.