WillPhillips
Forum Replies Created
-
Forum: Themes and Templates
In reply to: I've Broken My Loop!esmi, you just made my month.
How the heck have I missed that?!?!
Forum: Themes and Templates
In reply to: I've Broken My Loop!Hey CFX,
Thanks for the reply.
As it turns out, the problem isn’t with my Loop setup at all – rather, it’s with the three query_posts I had in play in other places on the page.
The Loop is aping the parameters of the most recent query_posts in play.
So, when the last query (at the bottom of the sidebar) called ‘tag=featured&showposts=1’, the main Loop showed a single post with that tag.
I removed that query, and then the Loop fell back to the second query_posts (“Recent Posts – middle of the sidebar) which called for ‘cat=1&showposts=4’, it displayed exactly that. Removing the second, the Loop reverted to the first query (“Featured:” at the very top in the header ).
Remove all the query_posts, and The Loop works fine.
I was under the impression that query_posts could be used as I had to set up calls to posts outside of the main Loop.
Why are my query_posts calls overriding The Loop?
Forum: Plugins
In reply to: Specify Full Sized Featured Image & Not 150×150 Thumbnail?Turns out it was as simply as that – with a twist.
Added the following lines to my functions.php to set new image sizes:
add_image_size( 'thumbnail-1x', 130, 48 ); // Permalink 1x Col Thumbnail add_image_size( 'thumbnail-2x', 330, 126 ); // Permalink 2x Col ThumbnailAfter that, it was just a matter of adding ‘thumbnail-1x’ or 2x to the_post_thumbnail.
This is where it got kinda tricky for a php newb like myself. Adding in the preset image size name replaced all the other content in the_post_thumbnail, specifically the class.
So, the easiest way around this was simply to replace the class with very specific css that would target these images. Perhaps not the most elegant or lightweight solution, but I’ll take it for now.
Forum: Plugins
In reply to: Specify Full Sized Featured Image & Not 150×150 Thumbnail?Had a different thought regarding image use.
Is this simply indented functionality outside of the Loop, and I’ll have to add something to functions.php?
As I have two different sizes in use, is setting set_post_thumbnail_size( ); in functions.php a viable route, if I set it to the largest size?
Forum: Themes and Templates
In reply to: Category Based Post Formats in the Loop?Update: Still unsure as to what is going on, but am certain this is tied into the Featured (8) category.
My chief finding thus far is that the Loop displays only the first post that has the Feature category (or has the Feature category along with another). It isn’t a multiple category problem, as a post with any two other categories (e.g. Blog & Link) won’t be displayed.
However, when I set an elseif(in_category(‘Feature’)){} specifically for the Feature category, it seems to ignore it and goes back to the default format of the else{} and still only displays that single post.
What am I missing here?
Have I inadvertently bungled my PHP (I’m a hack at best) or is there a WordPress feature/bug I’m missing?