Solved

Show WP thumbnails differently depending on category

Posted on 2014-01-24
1
159 Views
Last Modified: 2014-01-31
I've created a loop that's getting posts of a certain category and displaying them correctly.  I know have a new sub-category in that loop where the images have a different dimension and don't fit inside the existing CSS layouts.

Is there a way to distinguish and define the layout based on category?

I'm using (in_category('category-name')) currently which is working to define, but it displays twice since I can't remove it from the overall loop.

When I remove the category from the loop using query_posts('cat' => -150) it obviously removes completely.
0
Comment
Question by:axessJosh
1 Comment
 
LVL 2

Accepted Solution

by:
axessJosh earned 0 total points
ID: 39825323
Ended up fixing it by adding a second loop with

array('category' => '- 1');

where the negative number is the category ID.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I want to start by talking about the use of plug-ins for WordPress. I started a web-site for a company I was working for a few years ago; I had extremely basic knowledge of HTML. I am a Graphic Designer by trade so I invited the opportunity as a cha…
Do you think that WordPress is just for blogs?  Think again!  WordPress is really a fantastic all around platform that you can use to develop websites on.  Integrated into its basic functionality is the ability to create pages using your choice of a…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question