Jump to content
Sign in to follow this  
georgerc

How to display a category in a Page?

Recommended Posts

georgerc

I am trying to display all categories in each page. So each page will look different according to category. Think of it as a newspaper with different sections, like Arts, Business, World news etc. And Each section will again have its own layout. As I create each page for each category, how do I display those categories, preferably in a magazine style? George

Share this post


Link to post
Share on other sites
brempfer
Make each page by creating it as a menu item. appearance>menus>categories>view all> Select the category and add it as a menu item. It will pull in the same style that your blog pulls. As long as the post is categorized properly it will show up there.

Share this post


Link to post
Share on other sites
georgerc
I did just that. The problem is it is displaying the category as a long list with excerpts. How can I put something specific for that category... a logo and some text to make it look different? And How can I make the layout look like the main page... like a magazine layout with full length excerpt and columns? The thing I am talking about is same as the newspaper/ magazine websites that have different look in each section? George

Share this post


Link to post
Share on other sites
brempfer
If you are talking about changing out the header and the overall look of each page, that would take no small amount of coding. For just a few changes (say a persistent sidebar alongside or in the content area) I have used a stack of "text" widgets and styled them separately with HMTL and CSS. You can get those seperately styled text widgets to pull per category by using the "widget logic" plugin and conditional tags...i.e. is_category('category-name') (http://codex.wordpress.org/Conditional_Tags)

Share this post


Link to post
Share on other sites
kastelic
If you go to PlatformPro -> Blog and Posts and set it to magazine mode, all posts pages (including archive/category pages) will assume the magazine mode layout. You may need to check that you have excerpts checked for category pages in that same settings page. However, it will not feature the full-width posts like the home-page does. Regarding putting some text for each category you can do this: Click on Categories and then each category and fill in the Description box for each category. Then activate platform base, and put this in platformbase/functions.php: [code] add_action('pagelines_inside_top_theloop','cat_description'); function cat_description(){ if ( is_archive() ){ echo "
"; echo category_description(); echo "
"; } } [/code] This will output the category description on each category page. You could use CSS to add background images for each one by using the category-specific selectors in the body tag. Here's an example: [code] #cat-descrip{ display:block; height:100px; padding-left:200px; } .category-something #cat-descrip{ background: url(http://example.com/image.jpg) no-repeat; } [/code] This would be for example, an image icon of about 200px width that would appear on the left next to the category description.

Share this post


Link to post
Share on other sites
georgerc
Thanks for the help. I am going to play with these codes and see. Thanks again to you both.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×