get_adjacent_post()
, which is used by all functions that return a (link to) the next or previous post, only has a $in_same_cat
argument, which looks at the categories the post is in, not the tags.
You could hook into the get_[next|previous]_post_join
to modify the join query for your call, but then it’s probably easier to copy the function, remove the category-specific code and replace it with tag-specific code. Or make it even more generic and submit it as a patch to WordPress 🙂
Related Posts:
- Get Adjacent Post By Tag
- Is it possible to have a Faceted Navigation/Filters on a Product Tag page?
- how do I get the tag name from tag id?
- Do tags have dates?
- Removing link ” from ” menu for some “links” without JS
- How can I let my audience tag my posts?
- Display tags in list without link
- How to display the_tags() as plain text
- Change tooltip in tag cloud
- Getting an ordered list of tags – via wp_tag_cloud or not?
- Is it possible to filter get_adjacent_post() with tags?
- How to allow user to perform search by more than one tag
- How important are WordPress tags for SEO purposes?
- Links open only on new tab or window
- Combining tags from post types
- Display tags belonging to a specific post type only
- Allow visitors to search by multiple tags (specific IDs)
- Displaying the most recently used tags
- Can’t Get ‘tag’ Page To Display only Tagged Posts
- how to change # of tag posts on /tag page?
- Link directly to the first post in an archive
- Set homepage to only display posts from one tag
- Tags as a dropdown with set tags
- Individual css class for each tag in wp_tag_cloud
- Special characters in tag get removed for comparison on save
- Efficient Tag Management?
- Tag link suggestion plugin
- How to remove ‘noindex, follow, max-image-preview:large’ in search page WordPress 5.7 up
- Order tags by the order they were typed
- connect last post with first post
- How to rename ‘TAG’ to ‘TOPIC’
- Don’t show a tag on a post if it is the only post with that tag
- Get current tag list in Gutenberg save function
- WordPress editor: “pick from existing tags” is gone?
- Return post tags with description
- How to display tag cloud without links
- How to get the Tags on Publish post hook?
- woocommerce product tags display
- Please help me to figure out how to display my tags
- Cross Site Related Posts?
- How to Next and Prevous Navigation Buttons on the end of the page with custom image Using Wp Post Navigation Plugin
- TinyMCE – how to select tags node from the place where the caret is?
- Limit tag selection to predefined list
- Change Post Class function
- Mass remove a number of tags from a number of posts
- Require tags for bbPress topics [closed]
- List posts from certain category, by tag
- Links do not open from click, only in new tab [closed]
- WordPress Tag Page Hook?
- get postviews under every posts in the main page
- Tags not working with custom post type
- next_post_link / previous_post_link not working with WP_Query
- How can i order get_the_tags?
- How to exclude a specific tag from the list of tags for the current post?
- Add text to Title dynamically using tags
- Checking if one of the post tags has options
- How to get all the available post tags using the WP Data Module?
- How to add a rest field to post tags?
- How to get links to previous and next archive page based on tag
- How to make tag pages look as /tags/%tagname%/ in the URL?
- Echo tags with an if statement and display php inside of the IF?
- Pagination Links Not Showing Up on single.php posts on iOS Devices
- Get Tag Slugs that start with a word
- Show all videos by tag name
- Can’t get the previous and next posts permalink
- Next/Previous links doesn’t work in the same category
- How do I display a greyed out next_post_link when there is no next post
- Print_r displaying two different post->ID if placed in sidebar or single.php
- Detect tag page and include an Image for that specific tag
- Automatically add tag (first 4 characters) to uploaded media
- How can I automatically hyperlink tag names that are in my post body to the tag page
- wp-cli error: “Term is missing a parent”
- Add a specific tag to default tag list
- Random tag in the post
- Remove little gray box from content page
- Get the publish date of the older post inside a tag
- Prev/Next Navigation on Single Post Disappeared for Custom Post Type
- How to test if the tag list is empty for the current page?
- Replace -tag in the_excerpt
- Can / should / how should I convert my WordPress categories to tags?
- Insert text BEFORE the “tag” title
- Title tag come up differently on search results
- Why doesn’t the_tags( ) accept empty string for first argument?
- tag based subscription
- Remove parentheses from tag cloud count
- Only display posts with a specific tag
- Prevent tag creation on the post edition page
- Attach link to pages accoding to tags
- showing tag beside catagory
- A simple question regarding tags and categories
- Conditional tag for attachment posts
- Get multiple tags by slug
- Post order by selected tags
- WordPress editor, change code wrap (bbpress?)
- Get TOP x Tags from selected posts
- Tags as autocomplete values
- Need to return all tags – including empty ones – in list
- How do I exclude categories from get_tags?
- How can I add meta tags in the WordPress header?
- WordPress Title Tag Not Changing