WordPress.org

Ready to get started?Download WordPress

Forums

Display Catagories as a full page post, no side bars (6 posts)

  1. jollyjollyjolly
    Member
    Posted 4 years ago #

    I have a theme that I wanted to change the display of my categories to full page instead of the two columns which it displays now. I have included the category php to my theme here. Thanks!

    <?php get_header(); ?>
    
    <div id="content">
    
    	<div id="contentleft">
    
    		<div class="postarea">
    
            	<h5><?php single_cat_title(); ?></h5>
    
    			<!--Replace cat=1 with the Category ID you want to display in this section.-->
    
    				<?php $recent = new WP_Query("cat=1&showposts=5"); while($recent->have_posts()) : $recent->the_post();?>
    
    				<h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    
    				<?php if( get_post_meta($post->ID, "thumbnail", true) ): ?>
    				    <a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;" src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="<?php the_title(); ?>" /></a>
    				<?php else: ?>
    				   	<a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;"src="<?php bloginfo('template_url'); ?>/images/thumbnail.png" alt="<?php the_title(); ?>" /></a>
    
    				<?php endif; ?>	
    
                    <?php the_content_limit(400, "[Read more about this property]"); ?><div style="clear:both;"></div>
    
                    <div style="border-bottom:1px dotted #BBBBBB; margin-bottom:10px; padding:0px 0px 0px 0px; clear:both;"></div>
    
    				<?php endwhile; ?>
    
                    <p><?php posts_nav_link(); ?></p>
    
    		</div>
    
    	</div>
    
    <?php include(TEMPLATEPATH."/sidebar.php");?>
    
    </div>
  2. randinicole
    Member
    Posted 4 years ago #

    if you dont want a sidebar get rid of

    <?php include(TEMPLATEPATH."/sidebar.php");?>

    that is the php action that calls the sidebar.

    Blah you edited your original post, if its the sidebar you want gone that will work. It is hard to tell what you are talking about unless I can actually see the theme in use that you are talking about. Are you talking about 2 different columns in addition to the sidebar?

  3. jollyjollyjolly
    Member
    Posted 4 years ago #

    Sry for that! I have a link to what I would like the category to look like here (layout-wise).....

    http://www.luxuriousbackyards.com/planning-your-project/

    and what it currently looks like.....

    http://www.luxuriousbackyards.com/category/featured_decks/

    Thanks :)

  4. randinicole
    Member
    Posted 4 years ago #

    Just take out what I said and it will work.

    I do not know if you are working with separate .php pages or modifying the page.php file but if it is individual cat.php pages you should be good with what I told you.

  5. jollyjollyjolly
    Member
    Posted 4 years ago #

    Okay that has got a lot of it solved and Thanks :) The sidebar for the category-x.php was, for some reason, linked off the archive.php in my studiopress agent theme.

    Only other question is how can I get my category.php to a full screen page?

  6. randinicole
    Member
    Posted 4 years ago #

    modify (in this case you will have to rename them if you are using the same id for other pages) the css for one of these. its hard for me to say without looking at the css myself.

    <div id="contentleft">

    <div class="postarea">

Topic Closed

This topic has been closed to new replies.

About this Topic