admin管理员组

文章数量:1323202

I am new to WordPress and PHP. I have created 4 menus but when I load the website (at path /), it shows "No post found"(because I am not setting any default page). I wanted to use one of the nav as a default to loading at / instead of any default page. How can I do that without using an extra plugin

Currently, I am using the Woocommerce plugin.

I am new to WordPress and PHP. I have created 4 menus but when I load the website (at path /), it shows "No post found"(because I am not setting any default page). I wanted to use one of the nav as a default to loading at / instead of any default page. How can I do that without using an extra plugin

Currently, I am using the Woocommerce plugin.

Share Improve this question edited Sep 12, 2020 at 23:10 Gufran Hasan 6918 silver badges20 bronze badges asked Sep 11, 2020 at 15:38 SanjeetSanjeet 11 bronze badge 5
  • You want a menu to display instead of a page? You will still need a page for that, even if it only calls wp_nav_menu() developer.wordpress/reference/functions/wp_nav_menu – jdm2112 Commented Sep 11, 2020 at 15:44
  • Okay...Is there any way by which i can redirect / to my nav slug for ex. Path / to /?xyz. By this my use case can be covered – Sanjeet Commented Sep 11, 2020 at 16:05
  • Can you be more specific what you mean by a nav? When you refer to default page what are you referring to? Are these WooCommerce specific terms? It's not clear what your question is about – Tom J Nowell Commented Sep 11, 2020 at 16:11
  • I am not using any pages/blogs on my website.. we have external affiliate products which shows under 4 different menus, based on the categories of the products. I wanted that visitors see product of the first menu whenever he visited for the first time. – Sanjeet Commented Sep 11, 2020 at 16:50
  • I believe you need to rethink your project plan. Using the code designed for site navigation to display products from a catalog is just a bad idea. It is like using a screwdriver to paint your house. – jdm2112 Commented Sep 13, 2020 at 16:15
Add a comment  | 

1 Answer 1

Reset to default 0

To assign menu please refer https://codex.wordpress/WordPress_Menu_User_Guide

There is Option to assign static front page https://wordpress/support/article/creating-a-static-front-page/

本文标签: phpHow to set Nav as a default menu in wordpress