menu_class showing up on DIV instead of UL

The reason this was happening was simple – I had just installed the theme and had not yet associated a menu with the ‘main_menu’ theme location. Once I had the menu assigned, the markup generated acted as expected. To assign a menu, go to Appearance > Menus then select the Manage Locations tab. On there … Read more

Permalinks linking to similar named site

Have you updated the links in your database? Are they still pointing to your live site? Sorry, I will elaborate. If you download your database you will see that the url for your live site will appear several times. For example: INSERT INTO `wpfr_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES (1, ‘siteurl’, ‘http://www.yourwebsite.com’, ‘yes’), The quickest … Read more

Problem to asign class to with wp_nav_menu()

Make sure your menu does setup correctly in that location in Appearance / Menus, unless it wont display that class. After you set the theme location to Primary Menu, it should work fine. No idea why, guess its a bug in WordPress. Also fix the typo: ‘container’ => false

Add class to current category menu item

You can use is_category() You can check the documentation here function show_parent_categories( $args = array() ) { $args = array( ‘hierarchical’ => 1, ‘show_option_none’ => ”, ‘hide_empty’ => 0, ‘parent’ => $category->term_id, ‘taxonomy’ => ‘product_cat’ ); $product_categories = get_terms( ‘product_cat’, $args ); $count = count($product_categories); if ( $count > 0 ){ echo “<div id=’main-categories-wrapper’><ul id=’main-categories’>”; … Read more

How can I stop wp_nav_menu from returning extraneous root links?

<h1><a href=”https://wordpress.stackexchange.com/questions/241420/<?php echo home_url();?>”><?php bloginfo(‘name’); ?></h1> Soooo I forgot to close my link tag in my header. Deeerp. Lol <h1><a href=”https://wordpress.stackexchange.com/questions/241420/<?php echo home_url();?>”><?php bloginfo(‘name’); ?> </a> </h1> closing the tag fixes the issue.

How to let the role “editor” to control the menu?

Add this to your functions.php // Allow editors to see Appearance menu $role_object = get_role( ‘editor’ ); $role_object->add_cap( ‘edit_theme_options’ ); function hide_menu() {       // Hide theme selection page     remove_submenu_page( ‘themes.php’, ‘themes.php’ );       // Hide widgets page     remove_submenu_page( ‘themes.php’, ‘widgets.php’ );       // Hide customize page     global $submenu;     unset($submenu[‘themes.php’][6]);   }   add_action(‘admin_head’, ‘hide_menu’); … Read more

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