• Resolved ssacrew

    (@ssacrew)


    I’ve been messing around with these for hours now and can’t figure out what I’m missing. I was able to remove the sidebar from view in this theme, but after using multiple resources, I am unable to locate the proper code to make my pages the full width of the page.

    I’ve searched the forums, as well as some google options, but none have worked. An example of the issue would be found here: http://ab0.307.myftpupload.com/?page_id=52

    Any help would be greatly appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Have you set up a child theme – if not, all of your changes to theme files will be lost when the theme is updated –

    http://codex.wordpress.org/Child_Themes

    Then see:

    http://codex.wordpress.org/Page_Templates

    Thread Starter ssacrew

    (@ssacrew)

    I do have a child theme set up. The steps I am following are this and similar ones:http://premium.wpmudev.org/blog/create-a-full-width-page-for-wordpress-in-5-simple-steps/

    Step one and two are no issue. Getting to step three is a PITA. There only instance of div ID in the content is
    <div id="page<?php the_ID(); ?>" <?php post_class("clear"); ?>>

    which I have changed to
    <div id="page-fullwidth<?php the_ID(); ?>" <?php post_class("clear"); ?>>

    The style.css sheet doesn’t have a #content. The closest I can find would be media, common, or main. I don’t see anything remotely similar to the sample codes though. There’s no options for changing the width that I see, even after searching the code. I feel like I’m taking crazy pills here!

    You don’t need to use anything from the existing styles. Make your own as needed – try this:

    .col-md-9 {
        width: 95%;
    }

    If that messes up other pages, what is the name of this new template?

    Thread Starter ssacrew

    (@ssacrew)

    I was able to figure it out. The code is slightly different than other ones out there, so if anyone else is using Onetake theme and needs it full page, here it is:

    <?php
     /*
     Template Name: Working Full Width
     */
     ?>
    
    <?php
    /**
    * The page template file.
    *
    */
    
      get_header(); 
    
    ?>
    
    }
    
    <div id="page-<?php the_ID(); ?>" <?php post_class("clear"); ?>>
    <?php if (have_posts()) :?>
    <?php	while ( have_posts() ) : the_post();?>
    <div id="main" class="clearfix container">
    <body bgcolor="#efefef" !important>
    <div class="row">
    
    <div class="breadcrumb-box">
     <?php breadcrumb_trail(array("before"=>"","show_browse"=>false));?>
            </div>
    
    <div class="col-md-16">
    <section class="blog-main text-center" role="main">
                                <article class="post-entry text-left">
                                    <div class="entry-main no-img">
                                        <div class="entry-header">
                                        </div>
                                        <div class="entry-content-fullwidth">
                                           <?php the_content();?>
                                           <?php  wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'onetake' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );?>
                                        </div>
                                    </div>
                                </article>
                                <div class="comments-area text-left">
                                 <?php
    									echo '<div class="comment-wrapper">';
    									comments_template();
    									echo '</div>';
                                      ?>
                                </div>
                            </section>
    </div>
    
    </div>
    </div>
    <?php endwhile;?>
    <?php endif;?>
    </div>
    <?php get_footer(); ?>

    Hi I have copied this code. I saved a plain text doc named full-width.php and put that into my child theme folder. It shows up in the page attributes templates section. When I activate this template I loose all content on the page.

    Am I doing something wrong? any ideas?

    Thanks

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

The topic ‘Full width’ is closed to new replies.