Resource – adding an archive and a search bar to your blog page
Who doesn’t love a little side quest? Now that you’ve built a blog page and added three posts, let’s take advantage of the tags and categories to create some additional functionality for our blog. In Figure 11.13, you can see an example of what we’re going to set up. We’re going to create a search-and-sort header to make it easier for readers to find the topics they’re interested in, search for specific keywords, and find tagged articles:
Figure 11.13 – Example of search bar and archive dropdowns
Here’s a step-by-step process to follow to add a search bar and two drop-down menus that will sort posts by tag or category:
- Begin by going to your main blog page and clicking EDIT.
- Add a section between your blog page and heading, or add some additional space to your heading.
- Use the block menu to add a Search block and...