You want a filter on pre_get_posts
restricted to the home page. Something like:
function pregp_wpse_214875($qry) {
if (is_home() && $qry->is_main_query()) {
$qry->set('order','ASC');
}
}
add_action('pre_get_posts','pregp_wpse_214875');
You may need something other than is_home()
, depending on how your “home page” is set up. The other most likely option would be is_front_page()
Related Posts:
- How to mark every 3rd post
- Delete post with all files attached to it
- disable WP automatically inserted line breaks after an image
- Strategy for handling hierarchical pages with empty parent content
- delete post also attachments
- Prevent WordPress from giving each post a number
- Single.php Active Category Class
- WordPress Rest API – Get all posts based on post_meta on custom endpoint
- Link for the page archive for posts, like using custom post types with get_post_type_archive_link
- How to edit wordpress RSS feed to show post title only
- Limit amount of results returned
- Require a featured image to publish post
- Making post views as sortable
- All my inserted images gets a link to the full image even if it is already full size image
- Is it possible to have two different previews of a post (ie. two templates for one post)?
- Disable single post page
- how to know if the post has pagination () or not
- WP Query related posts by current page Tag ID
- Global $post not working in OOP function WordPress
- Bulk unpublish posts between specific dates (e.g. from April 2017 and earlier)?
- How to filter posts that belong to a specific category only if that is the only category
- The short content by characters [duplicate]
- Hiding Posts on Front Page and from all plugins
- Modify Image Source With The_Content Filter?
- remove older posts link [closed]
- How to show user’s own post in a specific page
- Display posts with tag that matches current post title
- post_content sanitization / transformation process
- How to create a post using REST API with sending data as a JSON body?
- Add filter by custom field to block of posts
- Recent Post Added To Menu Shows Ghost Post With No Title
- How to access $post from a callback function
- How can i limit the number of posts created per category?
- Pagination with an array of post objects?
- Removal of Media Gallery pictures
- WordPress capabilities on pending post status
- Visual (non-HTML) display of post revisions [closed]
- How can I hide tags on a child-category page, if that tag has not been used?
- One post on my website is going to a 404 page
- How can I get a table with the number of published posts by date?
- An array of latest wp_titles
- posts not showing on index.php
- “about us”, ” contact” sections should be article(post) or page in the simple small Business website?
- Page template is accessing the incorrect posts?
- Is it possible to use WP_Query to only pull posts with attachments?
- disable Tab post on nav-menus page (Admin)
- How to make the home screen of my blog not show full posts?
- Best Way to Add UnEditable HTML to Posts
- Manage Private Posts
- Stop wordpress from creating empty/null entries
- How to get post with associated categories and tags names instead of ids with rest api?
- How to get the old WordPress Draft Editor view back with the Word count?
- Force a specific template as default
- Updating post meta for checkbox
- How to make Link to go on the first post
- Insertion of a non-english string to database
- Programmatically add posts from specific category to menu
- Current and next month posts
- Adding a meta box to determine the sidebar [closed]
- https and wordpress breaks posts
- Date is wrong on ‘all posts’ page
- Is there a way to display others posts in my post?
- How do I disable the “by author” hyperlink on posts?
- Custom post type slideshow background images to insert in a plugin
- How to call WordPress First Image Post or else Attached Image or Default
- Recent posts script mess up blog posts
- Regarding Posts
- How to allow arbitrary inline CSS in posts?
- How to Remove HTML Elements from Post Excerpt?
- How to optimize posts query in wordpress
- how can sort my column
- Featured Story Shortcode not outputting content
- How to remove a post from results by ID after query?
- Blog featured images disappeared on my homepage
- How to run select query of post with category and tags?
- WP_Query extended with AJAX
- Manipulating images inside post content
- How to create frontend Post filter using meta query
- Point users to a specific url directory for some posts
- WordPress The Next Posts
- Post Format problem
- User rank in wordpress post
- Add Image Before Posts Entry Title
- Some comment box wordpress in 1 post [closed]
- Authentication over CURL
- Adding The Post Template Dropdown to WP-Admin
- wordpress paginate, link to the right page
- How to link two news page multilingual press
- Delete junk text from all the post using my sql command
- Separate categories parents, childs and grandchilds in dropdowns
- How to Do Custom Fields to Output a Definition List
- Using the_excerpt() some posts are truncated and some are not
- Is there any SEO impacts on unattached vs attached images for a post in WordPress?
- Get simple field value with post id
- Taxonomy Category category.php not working
- WordPress More tag doesn’t work on Single post
- How to save the same post in multiple blogs?
- Site ‘Categories’: save an admin global setting with post metadata [closed]
- How to get post ID after removing that post?
- I cannot see the pagination in /wp-admin posts page