WordPress.org

Forums

Custom Community - can't remove the sidebar (3 posts)

  1. fjandinn
    Member
    Posted 2 years ago #

    Hey all,
    I start by saying that I'm a complete newbie so please forgive me if I ask something really easy and I don't use the correct terms...
    So:
    I am creating a website which has a static main page that shows just the last blog post.
    I created this page using the standard template from Custom Community theme which has a sidebar where I embedded a twitter feed (so far, no problem).
    The problem comes with the other pages...
    Each one will pull form the blog posts just those assigned to a specific category, therefore I edited someone's code and I created page templates that does that (sorry if I don't quote the name but I'm a bit all over the place at the moment).
    Here's how it looks like:

    <?php /*
    Template Name: Category1 Page
    */ ?>
    <?php get_header(); ?>
    <div id="content">
    	<?php query_posts('category_name='.get_the_title().'&post_status=publish,future');?>
    	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
    	<h1><a>"><?php the_title(); ?></a></h1>
    	<p><?php the_content(); ?>
    	<hr style="color:#181818 ;background-color:#181818 ;height:1px;border:none;"/>
    	<?php endwhile; else: endif; ?>
    </div>
    <?php get_footer(); ?>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    Now... This page has a side bar (I didn't necessarily need it, but in the end I like it...)
    The problem is that I don't want the twitter feed on each single page... And I really don't get how to remove it... =/ I think (but of course I am not sure) that it comes from <?php get_header(); ?>...

    Well... Thanks for your help!

  2. Archie22is
    Member
    Posted 2 years ago #

    You need to select Categoy1 Page as your current template in your pages. It looks completely fine to me. At the moment your pages could be loading using a different template.

    By the way, what theme are you using?

  3. fjandinn
    Member
    Posted 2 years ago #

    Hey, thanks for the answer!
    The theme I'm using is named Custom Community.

    I actually already select Category1 Page as my current template... And it works perfectly - meaning it returns all the post listed as Category1 -

    The problem is that in the page the Twitter feed tool still shows...
    And also that the
    <hr style="color:#181818 ;background-color:#181818 ;height:1px;border:none;"/>
    is overlapping the right sidebar.

    I know that I could assign a specified width to the HR, and also center it. But... As a specified width works, on the other hand the "center" won't center a thing.

Topic Closed

This topic has been closed to new replies.

About this Topic