If you are using WP_Query you can search for tags using this code:
$query = new WP_Query( array( 'tag' => 'cooking' ) );
For more tag options see this page: https://developer.wordpress.org/reference/classes/wp_query/#tag-parameters
Related Posts:
- Search Custom Post Type Pages and Custom Fields in 2 Dropdowns?
- wp_query ‘s’ parameter does not work with custom post type
- Filter Custom Post Type by Category with Ajax
- Search results posts_orderby and ID
- Dynamically switch template on click
- What would causes search to return incorrect results?
- search form for custom fields
- Redirecting wordpress search query to archive page
- WordPress search for specific Post Type
- Customize search results to include custom posts and display in a specific template page
- How can i retrive the movies, trailers, news in a single page using search
- Custom Post Title as search term
- Custom loop pagination links not working
- Prevent Delete Attachment by URL or When Submit
- Enable Comments Box On Custom Post Type
- wp-cli post create & media import issues
- How to filter my search in post if contains a word in title, content or excerpt?
- How can i limit the number of posts created per category?
- Getting Custom Post Loop to display in Bootstrap 3 column grid
- Turn On Comments On Custom Post Types in Directory Theme
- WordPress custom Query for Posts in Category display posts multiple times
- Responsive images with custom image size
- Making a custom Pagination for multi page blog post
- ERROR: Your feed is invalid (after update WP4.7) in custom types
- Editing the default page to show all posts, rather than most recent ones
- Unable to restore from backup – how to obtain old blog posts?
- Loading post with Ajax
- Posts and Attachments with “Published” status in Search
- Genesis + Ajax + Jquery | Failling to call action
- Random ajax load only works with posts_per_page set to -1
- Automatically add date to the auto generation of post slug
- Permission issue with custom post type – not added to menu – by plugin
- Duplicate Custom Post Type and Taxonomy Slug
- How could I change my Permalink from blog to custom structure? [closed]
- Remove Custom Post Type Slug and add Custom Taxonomy to Permalink Structure?
- Take a received feedback item, turn it into a post
- Getting value from get_post_custom
- WP Admin register taxonomy and post type performance
- Send post id through ajax and get the post content back
- Add a custom meta box in the post options that loads some html code in the header
- Static posts page with home.php
- Calling Different Custom Post Timestamps in a table
- WordPress Multisite – Create Default Post and New Category On New Site Install
- Admin – create custom post status and display above table
- Using ajax on editing a category edit page?
- custom post template file not shown, instead all the time 404.php
- Set Default Category to Username
- Dynamic dependent Dropdown lists for categories, sub-categories and posts
- How to allow visitors to filter posts by multiple taxonomies
- show custom post type category dropdown sorting result on same page
- Custom Post Type Rewrite To Include Parent Page(s)
- Auto-realod with new posts // Ajax call
- Thumbnail & Category link aside post
- How do I change the core post search algorithm? Where is it found/constructed?
- How to include my own css in post
- Custom post types related to same custom post type?
- How do I insert a post with custom post type and relate it to a custom taxonomy?
- “about us”, ” contact” sections should be article(post) or page in the simple small Business website?
- Is it possible to customize the post according to post format in single.php?
- Customize rel=canonical tag for single blog post
- a little direction on custom post type
- disable Tab post on nav-menus page (Admin)
- How to add add more properties to WP_Post object in search results loop
- Format latest/newest post differently
- Custom taxonomy archive page problem
- Tell WP to use a specific template file in posts
- Is there a way to create a meta box that can be added multiple times to a post dynamically?
- relating business and products with custom taxonomy?
- Best Way to Add UnEditable HTML to Posts
- How safe is it to delete old posts edits to save database space?
- Two Custom Post Types with Identical Articles Competing for the same Slug
- Custom Post Type archive
- WordPress custom post type with folder structure in slug
- Using setup_postdata() with multi-dimensional array
- Total number of posts in query (category/tag/author/search results/main page…)
- Is codex right on deleting post?
- Lock post editing to one user at a time – wp_check_post_lock
- Check if a custom post type has already been created
- WordPress Query Posts From Category Post on Static Page
- Edit multiple custom post types while saving a new or edited post
- WordPress : using AJAX to get posts & Sidebar Content to an external application
- Create a custom posts page
- How to add automatically bootstrap 4 order-lg-1 and order-lg-2 classes for columns in foreach loop based on the count?
- See if a post has a specified tag
- if in category but only with post meta
- How to get different Related Posts
- How to add convenient buttons for new custom post statuses
- wp_query with ajax
- How to allow multiple thumbnail upload for Posts?
- add external project to web site wordpress on production
- Deleted a user with administrator rights. Now all the data/content/images are lost. how to recover them back
- Show custom post with custom categories with specific slug
- register_post_type permalink
- Display the 2nd category name of a custom post type without error if its null?
- Call current post URL in ajax
- Auto delete posts based on content text
- How to call posts under a specific category on static front page?
- Querying another post category to match current post and display in loop
- Custom home page with full post for first one only
- Custom Post Limit for homepage only without plugin?