Skip to main content
Share Your Experience: Take the 2024 Developer Survey
1 vote

Global $post value outside the loop

Yes, this is how it is supposed to work. The global $post variable is set quite early in the page load, at the wp hook. As you can see from the hook order, this is before the loop starts. Basically ...
cjbj's user avatar
  • 14.6k
1 vote
Accepted

Getting the wrong featured image on archive page

The default WP_Query object on the blog homepage is the feed of blog posts rather than the page itself, so you'll need to grab the post ID manually and pass it to get_post_thumbnail_id(): function ...
Chris Cox's user avatar
  • 1,277
1 vote
Accepted

Is there a standard "Archive" block that shows ALL posts from a specified category?

All the items under your "What I want" list can be easily achieved using the Posts List block which is a variation of the Query Loop block, and if you want to, you can create your very own ...
Sally CJ's user avatar
  • 39.3k
1 vote

If all posts have exactly the same publication date/time, to the second, what order are they listed in the main query?

In short, it's implementation-dependant. See: https://dba.stackexchange.com/questions/6051/what-is-the-default-order-of-records-for-a-select-statement-in-mysql https://stackoverflow.com/questions/...
Sally CJ's user avatar
  • 39.3k

Only top scored, non community-wiki answers of a minimum length are eligible