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