Custom loops do not produce pagination like that.
You have two options:
- Use custom archive page and provide custom php template for that (i.e. archive-my_name.php), in this custom template you could provide all other necessary content. Then you could use standard built-in pagination functions https://developer.wordpress.org/themes/functionality/pagination/
- Continue in the direction you started, with single.php, but you would need to provide your own pagination, together with rewrites for custom pages. Again, https://developer.wordpress.org/themes/functionality/pagination/#methods-for-displaying-pagination-links provides starting point for that.
I advise using option 1. as easier.
Related Posts:
- Custom SQL query to get List of posts with featured image url
- Get_the_author doesn’t return author name
- Using loop pagination on single.php
- Unreadable pagination
- Pagination on Custom Post
- how to make an array of post id’s in is_single
- Pagination at category doesnt work with same name of page
- Limit the number of characters/words in an excerpt for a related posts section
- How to center all text body in single.php at once?
- LinkedIn Share Post Button
- WordPress Single Post Pagination Numbered and Navigational
- Get current_post in reverse order with pagination
- Apply filters when loading post via ajax
- Blog Posts not sorted and pagination not adjusted after filtering some category
- Category Attachment Pagination 404 Error on 2nd Page
- Adding nofollow to a PHP generated Nav
- How to show part of the_content?
- WordPress 3.2 query_posts and pagination, permalinks issue
- 200 Rewrite blog post links
- How to set a min number of words for a blog post
- Loop through categories and display posts title under each dropdown
- Get post id in a function when edit/add a post
- how do I get a specific post from a post with a subcategory in WP
- Automatically create child pages and grandchild pages when saving a (parent) page
- wp_trim_words() does not work with my code Am I doing any mistake in my code?
- Second transition_post_status hook fired instead of the first
- How to show all pages in blog navigation?
- get_terms pagination
- How to store post ID’s in cookie or session to display the same posts later
- Which hook/action will help me solve my problem?
- How can I add extra word in permalink when someone click download button?
- Post + form + action + results on the same page
- Open post-content in archive page in a Modal box with bootstrap
- Search not showing all results
- remove post that has no content
- Pagination in plugin’s backend
- Loading index.php contents which located outside blog folder for post single page
- get post content of particular post by url
- Post repeating with infinite scroll
- Custom posts in different columns style
- Get children post mime type using parent post_ID wp_post
- How to show only subcategories in parent category not parent category?
- 404 error when I acess the second page of post-type
- PHP code to use on next & previouspage links
- Pagination for custom shop loop woocommerce
- Which PHP page is the Default Posts Page
- pagination on data fetched using SQL query
- Cant get paginations on single.php to work with my custom post types
- How to get all author posts outside of author templates
- retrieve post data and insert it in seperate static html page without WordPress
- WP Insert Post and then go to post
- Why am I getting a different filename? And how does WordPress load singular.php for both Page & Post? (Fresh WordPress installation)
- Returning data instead of echoing/printing
- Display related posts without a plugin
- Counting Search results, and displaying the offset per page
- How to create pagination for users list using custom array?
- Count posts on multisite with blog id
- Function works everywhere, how to keep it to execute when creating a new post
- Making (and edit existing) posts with ID included
- Custom Pagination is Broken
- Copy taxonomy terms from one post to another programmatically
- single.php with different look by category
- Parsing Menu Items and Blog Posts
- $wpdb returns duplicate posts
- How to avoid duplicates when creating recent network posts
- Next post link on a bootstrap button
- How to show an entire post content and not also the excerpt?
- Get latest post from all categories except one
- What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?
- Update post title from external file?
- Parse error: syntax error, unexpected end of file
- 2nd page displaying the exact same posts as my first page (minus the very first post)
- Prev/Next Links Broken on Static Front Page Pagination
- Automatically add images to a menu
- Why is a wp function used in current PHP namespace’s callback not resolved to global scope?
- Load Posts on Click via Ajax into a DIV
- How to catch wordpress post ID when it’s published
- set post limit at load more ajax wordpress
- Rewrite with pagination /foo/page/2/ to posts of a given category, page 2
- the_posts_pagination() not working in wpquery
- WordPress query undefined offset in loop
- Check If Post Was Published More Than 6 Months Ago Using get_the_date
- Find Site ID From WP_Post
- WP_Query: getting posts where custom field exists
- Array to string conversion on array_map
- Store metakey value as an array
- Increment paged on WP_Query
- Only show first image in foreach loop
- ACF Repeater Pagination stopped working since upgrade to php7.2
- Generating rel=”prev” and rel=”next” using filters
- How to use mysql LIKE with wpdb?
- Reading settings in the home page precisely home.php
- Do I need to edit my theme in order to change the title of my blog page?
- Need help with Code Correction php+wordpress
- Add new post in existing categories using wp_insert_post
- Custom query vars filters problem with pagination
- WordPress upload file size error even after raising php limits
- How do I add more options to the post-new.php page?
- How to Handle Going Backwards in Navigation When Referrer in PHP/JavaScript won’t work?
- get post id from wp_insert_post for get_template_part