• Hi I am using wordpress4.1 and using 2015 theme with a child theme.

    I wanted to make a full width page so i followed a tutorial posted in here and made a php template in my child theme using the code they supplied.
    I can open and edit the template but my problem is that the page has a limited length. I can only add content inside a certain area but when i try to add more down the bottom of the page the page wont expand.

    Here is the code i used in my child theme can some one tell me if there is something missing or if they can give me some code so the page does not have a limited length. Thanking you in advance.

    <?php
    /**
    Template Name: Custom Full Width
    */
    ?>
    <html>
    <head>
    <?php wp_head(); ?>
    <style>
    body:before,
    #sidebar,
    #colophon,
    .entry-footer {
    display:none;
    }
    .site-content {
    margin: 0 auto;
    float: none;
    width: 100%;
    max-width: 1200px;
    }
    </style>
    </head>
    <body>
    <div id=”primary” class=”content-area”>
    <main id=”main” class=”site-main” role=”main”>

    <?php
    // Start the loop.
    while ( have_posts() ) : the_post();

    // Include the page content template.
    get_template_part( ‘content’, ‘page’ );

    // If comments are open or we have at least one comment, load up the comment template.
    if ( comments_open() || get_comments_number() ) :
    comments_template();
    endif;

    // End the loop.
    endwhile;
    ?>

    </main><!– .site-main –>
    </div><!– .content-area –>
    </body>
    </html>

Viewing 15 replies - 1 through 15 (of 15 total)
  • Take the CSS out of that template – it should always go in an external file.

    And post a link to your site where this page is.

    Thread Starter totalyrecycled

    (@totalyrecycled)

    Thanks I am new to word press so was only followoing a tutorial What do you mean by an external file?

    I only have two files in my child theme

    Here is the page in question http://www.wiseproductsonline.org/?p=216

    Thread Starter totalyrecycled

    (@totalyrecycled)

    Im am not sure about CSS either .

    Thread Starter totalyrecycled

    (@totalyrecycled)

    So should i take some of the code out of the template .php file and make another file called .external?

    No, let’s back up. So I’m assuming you copied that code from this thread:

    https://wordpress.org/support/topic/full-width-page-15?replies=15

    That’s not a well coded template – I have not even looked at it closely but I would not use it.

    Another thing is that your child theme is not correctly done – using @import in the style.css file is no longer good practice – see:

    http://codex.wordpress.org/Child_Themes

    But the bigger question is what are you wanting to do? If you have a full-page template – where is the navigation? How does that work on your site? If you just want a landing page you can code however you want, it would probably be easier to use a landing page plugin.

    Thread Starter totalyrecycled

    (@totalyrecycled)

    I am just wanting to make some sales pages and landing pages with no site navigation in them so i can lnk to them externaly but i dont want them showing up in my site navigation . The child them i used was coded for me by another admin on here a couple of days ago and did what i wanted by removing the navigation from the botom of my posts I will put a link to the thread for you.

    Thread Starter totalyrecycled

    (@totalyrecycled)

    Thread Starter totalyrecycled

    (@totalyrecycled)

    My reason for removing the navigation on my blog posts is so i can send people to each individual page from my auto responder but not have the pages linked .But i also wanted to make some seperate sales and landing pages etc with out the left side bar so i created the whole page template.

    Well, he’s wrong (and not an admin on this site – that’s just his user name) – I don’t know why he would tell you to do it that way. It’s not a huge problem, but just no longer considered to be the best practice. You can change it or not :)!

    Also, you can control what shows up in your navigation by using a custom menu – http://codex.wordpress.org/WordPress_Menu_User_Guide

    So are the pages you want to make part of your site or standalone or ??

    If you do need a template like that one you have (sort of) I’ll have to look at that template code to see what’s going on – sorry, I don’t have time to do it today – so unless someone else picks up this thread, I’ll do it in the morning.

    Thread Starter totalyrecycled

    (@totalyrecycled)

    Ok Thanks again for your help yes i just want some stand alone pages It was working ok except for the limited page length

    Actually, that page is a huge mess – because the template is not coded correctly – in fact, I’m going to delete that post on that thread, as it doesn’t do any good to have inaccurate info posted.

    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.wiseproductsonline.org%2F216%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

    Thread Starter totalyrecycled

    (@totalyrecycled)

    On my tutorial posts i have removed the navigation from the widgets as later on i will put navigation back on for the pages i want to show together. thanks again for your help i am now just reading a tutorial on makeing external CSS files

    Thread Starter totalyrecycled

    (@totalyrecycled)

    mmm ok thanks again I think i will just have to build the page in my other weebly acount for now and link it back ive spent a couple of days now trying to just get a simple page up . let me know what you come up with as i am not a coder thanks again

    Yeah, sorry that wasn’t great help that you’ve gotten here. FWIW, you can always make static HTML pages on your server and link to them to and from your site.

    or this might work too:

    https://wordpress.org/plugins/landing-pages/

    Thread Starter totalyrecycled

    (@totalyrecycled)

    Ok I instaled that plug in and tried making a single page with no side bar and i still have the word press default side bar on the left hand side Can some else please help me to modifie the first bit of code i put up so my page will extend as it was doing every thing else i needed even though admin said it was the wrong code.I realy wanted to get this page finished today.

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Full with page limited height’ is closed to new replies.