• Resolved ingibjarni

    (@ingibjarni)


    Hello,

    I have WordPress 5.1 running Omega theme.

    I wanted to create a standalone page which is outside of the theme, so I created a custom page template like this:

    <?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>

    This is the page in question: https://www.ingibjarni.com/tenging

    It is basically what I wanted except for one small problem, the page width is just a little bit to big as you can see. There are horizontal scrolling arrows at the bottom of the browser now. How can I fix this?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • mrtom414

    (@mrtom414)

    I think you have 2 option one figure out what pushing past the right side margin and adjust it or you can hide the overflow in the body. If you hide the overflow you might cause your images to be clipped on the right side.

    body{
    
      overflow-x:hidden;
    }
    • This reply was modified 6 years ago by mrtom414.
    Thread Starter ingibjarni

    (@ingibjarni)

    Thanks, adding that code worked!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom page template // width problems’ is closed to new replies.