How to remove sidebar on certain pages with Exact Theme?
-
Hey Warriors, I tried everything available on the net with no avail. I want to remove the sidebar from certain pages, so that the remaining body content of the page will occupy the full width.
What I managed to do is to remove the sidebar, but the remaining content won’t span the entire width, the used-to-be sidebar area simply becomes blank.
The steps I took:
* Duplicate the content of the page.php with the following modifications:1) add
<?php
/*
Template Name: Custom Page
*/
?> before all pre-existing codes.2) Remove <?php get_sidebar(); ?>
3) Change the div id from “pagecontent” to “custom-page-content-wrapper”
4) Save it as another .php file and upload to WP via Filezilla
5) Then I opened the style.css and at the bottom, I add
#custom-page-content-wrapper
{
width: 100%;
float: left;
margin: 0;
}6) I was able to go to the designated page and switch the template to the new one. And it does remove all content from the sidebar except the remaining content doesn’t expand over the full width. Please help. Thanks.
=========================================================
I am using the Exact Theme (the name is called “Exact”). I modified the original page.php and created this page_no_sidebar.php by giving it a new name and remove the code calling for side bar.<?php
/**
Template Name: No Sidebar
*/get_header(); ?>
<div id=”pagecontent”><?php if ( have_posts() ) : while ( have_posts() ) : the_post(); //The Loop?>
<div <?php post_class(); ?>>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<div class=”postfooter”>
<?php wp_link_pages() //Page buttons for multi-page posts?>
</div></div>
<?php comments_template(); ?>
<?php endwhile;endif;?></div>
</div>
<?php get_footer(); ?>This is, http://www.youtube.com/watch?v=Mhmdl3zqmUM, the youtube *closest* to give out the solution. However, in the video at 0.33s, he created another class and modify it in the css file. I don’t see anything like that in the page.php from the Exact theme. So I am not sure what to do. Do I need to identify the corresponding class? If so, any suggestion of how?
-
You did not specify a blog address or reason for posting when you created this topic.
This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.
If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.
If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.
This is an automated message.
- The topic ‘How to remove sidebar on certain pages with Exact Theme?’ is closed to new replies.