Do you want users to search posts by tags in WordPress? By allowing search by tags, website owners can improve the user experience and make their content more accessible.
With the Search Bar block from the Nexter Blocks, you can easily allow users to search posts by tags in WordPress.
To check the complete feature overview documentation of the Nexter Blocks Navigation Menu block, click here.
Requirement – This block is a part of the Nexter Blocks, make sure it’s installed & activated to enjoy all its powers.
To do this, add the Search Bar block on the page or template and follow the steps –
1. Open the item under Search Bar and select Taxonomy from the Source section.
2. From the Select Taxonomy dropdown, select Tags.
Now, you should be able to see a dropdown beside the search bar.
In the Label field, you can add a label name for the select dropdown.
In the Placeholder field, you can add a placeholder text for the select dropdown.
You can show all the search results on load by enabling the All Result toggle.
From the Show Count toggle, you can show the number of posts the item has in numbers.
Note: You can click on the +Add Item button to use both posts and categories as filters as well.
3. Now go to Extra Option tab and enable the AJAX Search toggle.
Now you can select a tag from the dropdown to show all the posts with a tag in the search result or you can directly search for blog posts with a specific tag.