You can use the built-in tag system for something like that. Create a tag for each day of the week, and then tag that post with one of those days. Wherever you display your posts, just check what today’s week day is using the DateTime object and make a query for posts that match that tag.
Get today’s week day:
$date = new DateTime();
echo $date->format('l');
Display posts in template using today’s week day:
<?php $query = new WP_Query(['tag' => $date->format('l')]); ?>
<?php if ($query->have_posts()): ?>
<?php while ($query->have_posts()): $query->the_post(); ?>
<h2><?php the_title(); ?></h2>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
<?php endif; ?>
Alternatively, you could perhaps also just use the publish date to determine what day it was published, and not even need a tagging system at all.
Related Posts:
- Keep featured content post in homepage with original order
- How to get posts published between a date and today?
- How to show related posts by category
- the_author() returns empty string
- Display all posts from specific categories on a page
- How to exclude latest x posts from a paginated query?
- Display content from a specific category
- How to display posts by current user/author in a custom page template?
- post_name empty after wp_insert_post
- Query posts distinct authors
- How to get previous 10 days post from a specific date – WP Query
- Number of posts per page setting is not working?
- WordPress Posts Out Of Order after 3.1 Update
- Query only Posts from Both of Two Category?
- Insert custom div between posts
- Can’t show comments count per post outside loop
- Only display posts with comments
- get_post_custom stripping styling issue
- Order post by year DESC and month ASC
- WordPress get posts by date without query_posts
- How to Display Post View Count
- get post id in while loops outputting page id
- Different amount of posts on homepage than paged pages
- Featured Posts for Category Pages
- How to get Advanced Custom Field Value According using POST ID? [closed]
- Cannot Update A Post, 404 Error
- How to merge the content of posts that have the same title?
- ACF date picker to trigger category change
- get posts, run a custom query, and join the results
- Show posts from two specific category in WP_Query
- search form for custom fields
- How to create loop of posts except post ID defined via ACF field
- How to work with posts and sub posts?
- Run a function when a custom post is update?
- Displaying all posts from other sites on the network on one site
- How to fetch courses in all languages in WordPress?
- Multisite how to display merged posts from two sites and sort by latest date?
- Template with ACF and Pagebuilder
- How to show post views shortcode data for each post on Posts List Page?
- How can I use query_posts to loop through posts and construct my own content?
- How to display particular categorie’s post which associated to specific user?
- Change post value in WordPress
- Show 5 posts and than 3 posts offset with pagination
- wp_query args with relation
- WP_Query to get posts in a specific tag or has post_format
- Make recent post display recent updated, instead of recent published
- Manipulate query to show specific post
- Querying posts from current category, using a variable as array argument
- How to correctly escape data
- Use special template for the first post in the loop
- Blog posts not displaying on blog posts page
- Repeating post how to solve this
- Sort Events by Venue Title – Sort Post set by related post ids
- WordPress Request Post All Post ID in a Loop? [closed]
- Auto populate custom fields by post date
- ACF Relationship – Get Parent’s Post Object
- Need help writing loop to display posts by categories in separate divs
- Get posts by category or author
- Sort / Filter Queries
- get_page_by_title() not working if special characters are present
- Modify WordPress loop after it has been run
- Query post category & remove any post id
- show latest authors blog post
- get “read more” with custom DB query like you would with WP Query
- How to get only current images of a post
- Ordering posts alphabetically by meta keys and title
- Why I obtain this WP_Query strange behavior trying to select posts having a specific tag?
- Why I have this strange behavior when I try to exlude the featured post from posts visualization?
- Run function after post is updated
- How do I control the fallback query after the original query returned cero posts?
- Remove duplicated posts in the loop if post has more than one category
- How to pass multiple checkbox values to wordpress query?
- Adding a category at even positions on main loop with modified pagination
- How to limit the number of results for all query_posts on mysite
- How to get all post titles starting with numbers and symbols?
- How to inject a post within a loop
- How to get alphabetic listing x other posts, based on first letter post?
- wp_query select if have comments
- Creating pages and getting their values from the database table
- How to limit post query to only return a total count of items with certain post statuses?
- Not displaying any articles on a custom made file
- How do I show the post title if an advanced custom field hasn’t been used?
- wp trim function not working
- Change from all posts to specific categories post on main page?
- How to make a local “scroll to ID” on post?
- Custom post order returning posts from other categories
- query_posts different amount of posts per page [duplicate]
- Count words for all posts by all authors
- How to detect if an ACF custom-field is really in use?
- Word count for all posts of all authors
- Do I need to create a multisite for querying posts from multiple WordPress sites?
- Dynamic archive of posts by date
- Sort Posts Alphabetically Based on Specific Category (Divi)
- How to make internal links creating plugin to respect ACF?
- How to change url of posts?
- Add “reviewedby” in WordPress posts
- How to show related posts by detecting the current category?
- Display posts on a custom page from only a specific category?
- Why does ‘get_the_ID’ work outside of the loop?
- WordPress Post Query Using Custom native MySQL like St_Distance_Sphere