I am trying to link a post to a drop down menu (sub-category). I want the post to pop up on the sub-category page when I select it from the drop down menu. I have selected the appropriate category before publishing, but it does not show up when I click on the drop down menu in the navigation bar. For example: I have a menu for Wine with a sub-category of White. I want the post to be on the White Wine page and be searchable with an html to the article. WP101 does not seem to cover this.
1 Answers
Hi Rani,
Actually, this video in the WordPress 101 course covers how to create custom menus, including links to specific categories:
https://wp101.com/tutorial/creating-custom-menus/
First, be sure the post in question has been assigned to the category, “White.”
Next, you'll add the category, “White” to your menu, using either the Customizer, or Appearance > Menus. Open the “Categories” block, and select your category, “White” from the list of available categories to add it to your menu.
Be sure to save your changes to the menu.
Then, when you visit your site, and select, “White” from your navigation menu, you'll be taken to the archive page that contains all of the posts assigned to the category, “White.”
Search is a completely separate thing. You can add the Search widget to your sidebar, footer, or other widgetized area, which is determined by your theme. But, it's important to note that the default WordPress search widget only returns posts that contain the search term in the title or content of a post. So, if a visitor enters, “White” into the search field, WordPress will only return results that contain the word, “White” in the actual content of the post, not all the posts in the “White” category.
For better search results, you may take a look at installing and activating the Jetpack plugin. Jetpack's Search functionality replaces the default WordPress search, and it's much more robust: https://jetpack.com/support/search/
Hope this helps!