0

I have created Wordpress website. Website structure is - I have home page for topic "iOS" in that all blogs for iOS appears. After click particular blog open. I want another menu for another topic "Finance" in which I want to show all blogs for finance and after clicking on that particular blog will open for finance.

May I know how can i create another menu. I tried to create another menu but after adding any blog to that menu that blog start appearing on main page i.e. for "iOS"

New iOS Dev
  • 1,937
  • 7
  • 33
  • 67

2 Answers2

0

Are you trying to get a specific menu on the header depending on the page the visitor is on?

Roughly, this may be accomplish by :

  • registring a new menu
  • in functions.php : create a PHP hook to find out the page and return it to the theme
  • in your header.php : filter the page returned by the hook and display the right menu among the registered ones.

I Hope this will help you dig in.

delicyus
  • 1
  • 1
  • thanks for answer but i dont have technical knowledge on wordpress and php, is this possible in wordpress settings only? – New iOS Dev Aug 25 '17 at 11:54
  • Yes @delicyus i want menu topic by topic. can i do this in wordpress settings only? – New iOS Dev Aug 25 '17 at 11:58
  • We'll maybe dig into the customisation of wordpress pages docs. https://stackoverflow.com/questions/9531559/how-to-create-a-custom-page-in-wordpress . You're welcome, I wish I could help more. – delicyus Aug 25 '17 at 12:03
  • and the official ressources : https://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates. – delicyus Aug 25 '17 at 12:04
0

By default WordPress fetch all latest post on main page. You need to write custom code to fetch posts related to particular category.

For example suppose you have two categories "ios" and "Finance" and you need "ios" category post on front page and need "Finance" category post on separate page then you have to create two template. Write custom code to fetch all "ios" category post on one template and "Finance" post on other template.

Then create two page one is "Home" and other one is "Finance". Then assign related template to created page. Then set "Home" page to default page and add 'Finance' menu from menu section to your menu list.

  • Thanks for information @abhijit can't we do this without coding? i dont have experience in wordpress and php – New iOS Dev Aug 25 '17 at 12:07
  • You can create two categories and then add those categories in menu from menu section. In this you can not pull 'ios' post on home page. But for this no need to write single line code. – abhijit Aug 25 '17 at 12:24