I think you can achieve this by first reversing the sorting order (filter posts_orderby
), and then reversing the selected posts (filter the_posts
). By doing this double reverse you circumvent the problem that you have to know the number of posts your query will return before you execute the query.
Keep in mind that WordPress (I think via the canonical rewriter) will remove the /page/1
part of your URL, so you should prevent this from happening. Also sticky posts might need attention. See the code for WP_Query::get_posts()
for hooks to change the post query.
Related Posts:
- When using global $post in blog index file (home.php) it returns the latest blog post instead of current page
- How to display on the blog page the posts corresponding to the selected language, using Polylang
- Creating a new blog using PHP
- Is the “Posts page” really required? Can problems occur if I leave it blank?
- multiple blogs on single site
- Building articles grid
- Having trouble showing more blog posts on my grid blog layout
- Separate blog on one WordPress
- Host a blog engine in my wordpress site
- How do I set up “blog” posts to a page other than the main/home page?
- Why is the_permalink not working?
- show scheduled posts in the calendar
- There is no link or button to my blog page
- How do i remove Responsive navigation bar from from single blog post
- How to show page content as well as post lists
- Latest post showing up as main title of page on blog page
- Archive posts on showing current page instead of archive
- Blog page is not showing properly
- How to list blog post from subdirectory wordpress install to the main site
- Check if current page is the Blog Page
- Creating custom blog page template the right way
- I put my blog on a subpage, how do I get page title?
- ID for posts/blogs page
- What is archive.php used for?
- Display content from a specific category
- Blog.php or how to display recent posts?
- Permalink: postname EXCEPT for blog
- Custom fields won’t display on my blog page
- Exclude category on blog list page
- index.php template is used instead of blog page
- How to change the permalink structure of a master page?
- How to change the link structure of the homepage?
- How to query ‘posts_per_page’ to display a different blog posts index template?
- Why aren’t my posts showing?
- is_page(id) not working for blog page
- How can I have a static title on my blog page?
- How to display blog posts on a dedicated page?
- How to display only the excerpt in the blog/posts page with Gutenberg?
- I am having trouble with article formatting when exporting/importing articles from the production to the development environments
- Setting a static home page and blog page without using the settings
- How to block access to blog-page for users not logged in?
- Changing next and previous post link text
- Defining different theme for Blog posts page
- How do I make the homepage as the blog page?
- home.php not loading
- Blog Posts not showing title
- Allow a static page to show on a dynamic home blog page before the posts
- How to create Blog Post Specific Widget
- Do I need an empty page for a different blog page?
- Can I install/embed WordPress on a ‘single page’?
- Apply a style for 4 blogs and another style for the next 4 blogs in wordpress blog page?
- Blog page problems
- Adding code to head to all pages manually
- Display a single category in blog section
- How to Get The Excerpt of the page that displays Blog Posts
- How to remove the h6 tag for the entry-category Class
- Showing “best posts” in front page
- How to set a certain Custom Template to a Single Blog Post
- Multiple Blog Pages
- Best practice for implementing a blog page / section in wp_menu_nav()
- Show preview of wordpress posts on external html sever
- Embedding Password Protected (Private) “Blog Posts” BLOCK that shows Images and Excerpts on Password Protected Page (not the home page)
- Blog post is redirecting to home page
- Post Publish date not display on Umaya Child themes
- Show only Current category and sub category of custom post wordpress
- “Blog pages show at most” in setting not working
- Use a 301 to Redirect any 404 from at the blog post level to the blog archive
- Blog page and the Home page showing the same content
- No comment Section but still got a Comment
- WordPress Iframe for blog image
- How to use a PHP file to control the content of a blog post
- Link to a custom page without a permalink?
- WordPress blog posts template bug [closed]
- Redirect Category pages to blog page with query string
- Blog post Links leading to home page [closed]
- Removing catagory for new blog pages
- Why does the blog page not take the page template selected?
- WordPress display page information rather than post
- Allowing Comments on Posts
- How to put the WordPress blog into theme
- Blog Post Title apearing twice
- After WP 4.6.1 Update , Blog page started giving 500 error
- Call/Run a Mathematica (.m) Shell Script from WordPress Page/Blog
- Limit the number of posts from a specific category on index.php
- A page created with url of blog redirects to the posts page, how do I stop this?
- Having single posts appear under the blog homepage and highlight menu items properly?
- Posts page template: How can I edit the markup for this?
- Posts page drop down is not selecting the selected page
- why is this content-template not showing any of my blog-entries?
- Overwrite URL on blog posts
- Older entries link within a category page
- Pulling sub-site content into specific pages
- Tables not showing divs and loop/php items
- In reading settings posts are set to “blog” and I have page-blog.php but no posts
- Blog page id different then in main menu
- thumbnail_width not working in wordpress most popular post plugin
- How to add paraent in Blog post URL in wordpress
- How to handle Ajax Calls, when using same shortcodes (with different parameters, e.g. ‘post-type’)?
- custom wordpress theme blog page always not showing the last two pages of the articles
- I have a website issue I am trying to resolve