Stokkes
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Order by post-formats (or equivalent?)Hey,
Thanks for the function. I’m at the office right now so can’t really try it. I dove through the wpdb yesterday and found exactly what you’re saying about format-link, etc being in prefix_term, prefix_term_relationships etc.
I could be wrong but you seem to have run into the same issue I’m faced with in your function. You first query all the non formatted post then the formatted post. What this will result in (If I’m not wrong) is posts displayed with no format first (all of them) then posts displayed with a format (all of them).
It’s close, but not quite there (and where I’m getting hung up). For each day, I want to display posts in this manner. Let’s take my previous example above, but go a bit further.
New example:
8 posts, 3 from Today, 3 from yesterday and 2 from 2 days ago The way I’d like it displayed is as follows (the way you’d see it when browsing the blog):Today’s Post (No Format – 6pm)
Today’s Post (Format – 10pm)
Today’s Post (Format – 11am)
Yesterday’s Post (No Format – 3pm)
Yesterday’s Post (No Format – 10am)
Yesterday’s Post (Format – 7pm)
2Day’s Ago Post (Format 9pm)
2Day’s AGo Post (Format 2pm)So the default chronological order is what I want, but I want to “shove” all the formatted posts (with ie: post-format-link) to the bottom of the day and leave the non-formatted post above. My reasoning is that non-formatted posts (or “Articles”) as I’ll call them have more weight than frivolous formatted post which is why I want them to appear on top. What I don’t want is a list of let’s say 10 non-formatted post (all from different days) and then 10 formatted posts (all from different days). They should still be grouped by day.
Forum: Fixing WordPress
In reply to: Order by post-formats (or equivalent?)Appreciate the help jnhghy…
I’m not quite sure what I’m asking falls into the links you referred to.
The first link mentions excluding posts with certain formats, which is not what I want to do. I simply want to order the posts that are in The Loop first by all posts that have no format, then posts that have a format while keeping them ordered by date.
The second link mentions categories, but really, post formats are not categories and cannot be referenced as such. They do not carry a cat id.
The default order for posts in the Loop are by date (newest at the top). I still want this, but I want to add a second orderby whereby anything returning has_post_format == TRUE will get put after posts that return false.
Pseudo Example (What I want):
Post (No Format – 5pm)
Post (Format – 6pm)
Post (Format – 10am)Current behaviour:
Post (Format – 6pm)
Post (No Format – 5pm)
Post (Format – 10am)Hope this is a bit clearer.
Forum: Fixing WordPress
In reply to: Order by post-formats (or equivalent?)Hi jnhghy,
This is what I mean.
I would like for posts that do not have a post format to come before posts that do have a post format.
So for example, let’s say today I write 3 posts, 1 of which does not have a post format, the other two that have a post format of “link”. When browsing the page, I’d like for my non-post format post to appear first, followed by the two “link” post-format posts, no matter what order they were written.
In the default loop, posts are sorted by date (this is good), but I want to add another orderby dimension that puts post-formats that contain the same date below the posts that have no format.
Thanks,
Forum: Fixing WordPress
In reply to: Do “Linked Lists” exist in WP?I actually found this :
https://www.istudioweb.com/hacking-wordpress-theme-external-url-for-post-title-2008-01-12/
Works well for the most part (except for being a royal pain in the ass to do) and I’d have to hack it up a bit to get it to work exactly the way I want it, but for the most part, it does work.
Except the RSS feed. When you click the link from the RSS feed, it goes to my site instead of the URL. I guess ideally I wouldn’t want an actual post created when I link stuff.. not even sure if this is possible.
Forum: Fixing WordPress
In reply to: Gravatars gone with 2.5.1?This helped.. thanks.