• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

css add class & extra padding to one php template

I would like to add 60 px right & left padding to this Wordpress category template page:
http://66.147.244.225/~minimosa/category/news/

I don't want to adjust the container attribute because it will affect all of the pages, including the non-category template pages.

How do I add css and a style class to the attached blog-category.php file and css file to achieve additional 60 px padding on all blog category pages?  category-blog.php style-2-.css
0
carolsanjose
Asked:
carolsanjose
1 Solution
 
idustyCommented:
Hi,

I'm not exactly sure now what do you mean. But I'm guessing you want to give padding to the entire content area? Did you already try to just add an extra wrap tags around the all of the content, for example:
<?php get_header();?>

<div class="category_wrap">

<?php
if($OPTION['wps_blog_cat_sidebar_enable']){
	$WPS_sidebar		= $OPTION['wps_sidebar_option'];
	switch($WPS_sidebar){
		case 'alignRight':
			$the_float_class 	= 'narrow alignleft';
		break;
		case 'alignLeft':
			$the_float_class 	= 'narrow alignright';
		break;
	}
} else {$the_float_class 	= 'wide';}
?>

	<div class="<?php echo $the_float_class;?>">
		<?php
		while (have_posts()) : the_post();
			include (TEMPLATEPATH . '/includes/category/blog-posts.php'); 	
		endwhile; 
		
		include (TEMPLATEPATH . '/wp-pagenavi.php'); 
		if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
		?> 
	</div>
		
	<?php if($OPTION['wps_blog_cat_sidebar_enable']){
		include (TEMPLATEPATH . '/includes/category/blog-category-sidebar.php');     
	}
	?>
	
	</div>	 

<?php
get_footer();?>

Open in new window


And CSS for example:
div.category_wrap {
    padding:0 60px 0 60px;
}

Open in new window


I haven't had a chance to test this, but I guess the principle would be the same though.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now