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
- Getting paginate_links() ‘end_size’ to display none
- I can’t fetch query parameters ($_GET parameters) with get_query_var
- Handling error states with admin_post
- WooCommerce – Customer Order History Pagination
- Insert code when users come from an specific referer
- How to display related posts from parent category
- get understrap pagination to work with custom query
- Make custom field meta not display if there is not data in it
- Customized title tag for each page in pagination?
- How to migrate the posts from an old custom legacy blog to a new WordPress website?
- how to know if the post has pagination () or not
- How can I use wp_query to show all product data using just the products ID?
- Trying to add attribute to my posts’ featured image
- How can I properly control the numbers and dots that appear in pagination?
- WordPress 3.2 query_posts and pagination, permalinks issue
- Loop through categories and display posts title under each dropdown
- How to store post ID’s in cookie or session to display the same posts later
- Post + form + action + results on the same page
- Pagination in plugin’s backend
- Display related posts without a plugin
- How to create pagination for users list using custom array?
- Count posts on multisite with blog id
- Making (and edit existing) posts with ID included
- single.php with different look by category
- Parsing Menu Items and Blog Posts
- How to show an entire post content and not also the excerpt?
- the_posts_pagination() not working in wpquery
- WordPress query undefined offset in loop
- WP_Query: getting posts where custom field exists
- Increment paged on WP_Query
- 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
- Modify main query before it run without pre_get_post
- .html end of URl affected to SEO?
- Displaying content on posts page based on category
- Loading Posts & Category with Ajax
- array_rand not working correctly?
- Update if post with specific title exists
- WP_Query() load selected post
- Custom pagination (Previous / Next)
- Unable to render custom field after attempt to generate a list of recent post in page template
- Why when I create a new post I found 2 record related to this post into the posts database table?
- Woocommerce Custom Meta Boxes- How to only display if they actually have content
- Advanced Query posts
- Help to modify wp_link_pages()
- My Custom Post Type AJAX Query is Returning no posts – why?
- How to get post image caption by index
- Inside Array – “unidentified index” error with “prepare was called incorrectly” despite not calling the prepared statement with wordpress [closed]
- Is there anyway I can call the year once?
- static page pagination not working
- Check $post->ID against multiple values
- Don’t update modified post date when user add a product review or comment?
- Posts missing on author page
- How to allow users to save list of posts in wordpress?
- AJAX numerical pagination problem in TwentyFifteen-child theme
- Closing Comments conditionally in comments.php
- Pagination – Previous link is not show and Next link sticks at page 2
- Having trouble with customizing blog posts on the home page
- Related Posts: if there is no category use tags
- How can I get my pagination loop to display the correct number of total pages?
- How do if all posts has this category ID then do this
- Add a leading zero to pagination
- Getting error in sql query
- Pagination for single post
- Insert div after every three posts in home.php [duplicate]
- PHP tag in post content makes wordpress go crazy
- Unable to get Post Category Name and URL
- Dynamically Create Posts Via XML File
- Basic PHP question (displaying post title over thumbnail) [closed]
- insert thumbnail image from php script
- Post from front end form to post_meta
- media_handle_sideload() returned post_id being incremented
- rewrite_rule – working fine but broken for pagination
- Saving Post redirects to 404 page when php $_GET variable in post body
- How can I add WordPress Audio Player as featured audio in Audio Blog Posts?
- Trying to see if page is category or single and displaying title with appropriate heading tag
- How can i list all user registered on my website and have pagination [duplicate]
- How to customize posts in WordPress by using HTML and CSS?
- How to add pagination for wordpress home page
- foreach all the post
- Pagination 404 on my index.php
- paginate_links() returns NULL instead of the pagination links, but pagination is actually happening
- Add multiple HTML attributes to an Elementor button
- /page/2/ redirect to 404
- How to use a conditional statement in a post loop but not count towards the “posts_per_page” if false
- Bulk data save in custom table