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/60293373/how-order-by-ordered-if-they-are-same-value The MySQL 8 ref manual here also stated that: On character type columns, sorting—like all other comparison operations—is normally performed in a case-insensitive fashion. This means that the order is undefined for columns that are identical except for their case. You can force a case-sensitive sort for a … Read more

List archive year – post by post

Here is a strip down of something similar I’ve done a while ago. Here is what the code basically does is: First, it retrieves the date of the first post on the block. Secondly, the current date is retrieved. These two values are fed into a range() function to get all years in between A … Read more

WP Archive & Category Pages not filtering

From the codex for get_posts() The category parameter needs to be the ID of the category, and not the category name. So you should either use category_name parameter with name or you could pass the ID to category. <?php $term_name = get_queried_object()->name; $args = array ( ‘category_name’ => $term_name, ‘posts_per_page’ => 5); $myposts = get_posts( … Read more

Create page like custom post type list in WordPress

One option is to set has_archive to false when you register the CPT. Then, create a Page with the same slug. So if your CPT is “mycpt” then create a Page at http://example.com/mycpt/. From there, set up a custom Page template to act like an archive, but you can also (optionally) add content in the … Read more

techhipbettruvabetnorabahisbahis forumueduseduedueduseduedusedusedueduedus