After some research I found a code snippet that exactly does the job as desired.
See https://orbitingweb.com/blog/adding-next-and-prev-tags-to-paginated-posts/ for details and further explanations.
Related Posts:
- Add tags to the section via functions.php
- Generate
- Generating rel=prev and rel=next only on wordpress categories
- get_next_posts_link not working without parameter max_num_pages
- Retrieve a value from Yoast SEO to use to set a default twitter card image honoring overrides
- How can I modify the element on all pages?
- Define custom Page Template without its own .php file
- Issue with get_theme_mod returning a blank value instead of the saved value
- Pagination adding page-numbers dots when using ‘mid_size’ => 0
- Add new user : make the fields First Name and Last name required
- Attach a private function at a hook?
- wp-admin page is blank
- How to use PHPmailer in a function in WordPress
- wp_is_mobile function
- remove from text-widget
- WordPress – thumbnail image from youtube (function and loop)
- Problem with extract() with custom shortcode
- How To Get WordPress Categories Link List?
- jquery won’t load in footer
- Count total number of images in post and echo results as number
- Functions – callback vs fallback
- How can I create a page with a specific URL?
- How to make child theme inherit parent custom theme options [closed]
- Get the category name outside of the loop in category.php
- auto generate title of custom post type which concludes id not working
- Multiple CSS body classes to specific page I.D.’s – is this possible?
- wp_validate_logged_in_cookie
- How does this function get the id of the most recent post?
- Short_title character problem
- Simple custom theme option not being saved
- Unset Category if other Category is unset during post transition
- Automatically wrap multiple images in div
- Ajax not working properly
- Conditional read more adjustment
- Assigning WP functions which echo to PHP variables
- How can I get my Script to work on the Login page?
- WordPress menu link doesn’t work properly
- Add custom function to a theme with child theme’s functions.php
- Filtering out the #more anchor link that gets produced by
- Does code run faster in functions.php than in different theme templates?
- file_get_contents – failed to open stream
- Exclude from the query posts with meta_key and meta_value
- wp_nonce_field is breaking form for reasons unknown
- How do I call a function to use on a page?
- get_post_meta() problem again
- Update users custom profile fields
- Add back in child theme what the parent theme removed with remove_action
- replace text in Sort Box
- login_headertitle is deprecated since version 5.2.0
- Where is this JQuery coming from?
- Different favicon on different pages
- Javascript not loading after the document ready
- Need to convert image url to a Base_64 data url with wordpress function..
- What is the better for call files: bloginfo() or echo esc_url()?
- WordPress website keeps loading the maintenance page
- Setting Permalinks in wp_config or functions file?
- How do I display a date correctly that is stored in the database as a backwards 8 digit number from Advanced Custom Fields? [closed]
- Modify shortcode to work with custom post types
- Dashboard blocker on network multisite for specific user roles
- How to place a div inside a function that creates a div
- Echo post title in post
- dynamic enquiry form [closed]
- Fatal error: allowed memory size when after using enqueue_script
- How would I make a function to dynamically determine if user is logged to change navigation menu text?
- How to redirect Subscribers on login to specific page, when logging in from a Page
- how can I add filter in specfic field in my website?
- How to change images url in function.php?
- Which filter fires upon setting a featured image
- functions.php pharse error on complete new install
- If has action not working as expected
- Update wp_postmeta table based on 2 keys
- Stylesheet does not load despite functions.php
- How to customize archive widget only for cpt?
- How to show only specific category post by user role without plugin and restrict all other cats
- Shortcode to output category description by passing ID
- some profile informations like youtube link doesnt seem
- Help using ShortCodes to style whole chunks of the post
- How to modify or override a core function (wp_star_rating)
- Hide empty custom field
- add product thumbnail to checkout page only and include variation name
- Lost Your password Hook Not Showing Up
- Function/way to redirect to specific page whenever a specific text occurs on homepage?
- Which method is more correct for removing WooCommerce Extensions menu item?
- Get child-pages slugs of current page into js-file
- Frontend Feature image upload not work
- Display page number on custom page title function
- Automatic add space if user enters number(any digit)
- Adding stick post button to edit post page
- A blank page is shown after I add a Function
- Undo a function that is not (seemingly) hooked to an action?
- If no input don’t display?
- Retrieve current post’s tags
- How to remove the automated code posted in functions.php?
- Why wp_ajax hooks doesn’t work?
- Two ‘If Statements’ is my syntax correct (functions.php) and what is ‘false’
- Remove snippets of JS from core
- How can I add authors to my blog pages?
- 500 error after upgrading from 5.0 to 5.4 and adding empty functions.php
- get page_id in ajax to function in functions.php
- How to add user_registered time in human_time_diff() wordpress