how to change single post link

On the WP Dashboard, navigate to: Posts => Categories Create new Category, name it – Products. Then go to your post/product-a, on the right panel search for categories and add the new category Products to the post/product. Save it or Update the post, refresh the page, now if you check the url for this post, … Read more

wp_nav_menu doesn’t work in a duplicate server

The menu data is in the database. In order to have an exact copy, you need to copy the files and all the items in the database as well. Verify if all the needed elements from the database are present in the wordpress admin and or with phpmyadmin. Alternatively, after these lines in your PHP … Read more

Programmatically add a Navigation menu and menu items

I might be misunderstanding you, but why not use wp_create_nav_menu()? E.g., this is what I do to create a custom BuddyPress menu when I detect BP as active: $menuname = $lblg_themename . ‘ BuddyPress Menu’; $bpmenulocation = ‘lblgbpmenu’; // Does the menu exist already? $menu_exists = wp_get_nav_menu_object( $menuname ); // If it doesn’t exist, let’s … Read more