Top Level Menu Item points to first item on submenu

Replace the menu entry for “travel” with “travel to destination”, then change the text in the menu item to “Travel” You can also do a redirect using a redirection manager plugin and redirect the /travel/ url to the sub category

Adding 400 product categories with their hierarchy to a navigation menu

Ok, I found a solution. I used a combination of a plugin that allows me to add shortcode to menus and creating a new shortcode for product categories in functions.php. Here is the code for the shortcode: function display_product_categories_hierarchy($parent_id = 0, $first = true) { $args = array( ‘taxonomy’ => ‘product_cat’, ‘hide_empty’ => false, ‘parent’ … Read more

Trying to add CPT to menu automatically

This code is pulling in custom posts automatically and setting menu order as it does within the function, so trying to change the order in the menu editor will likely cause an error. To change the order change this line: foreach ( get_posts( ‘post_type=cpt-post-type-here&numberposts=-1’ ) as $post ) { to foreach ( get_posts( ‘post_type=cpt-post-type-here&numberposts=-1&order=ASC’ ) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)