Not able to get current menu ID

As far as I’ve seen a menu object does not have the ‘current’ property, does it? Not that I ever seen it, at least. So you can get close to what you’re asking by comparing the current post/page ID (get_the_ID()) with the items’ object_id property, when they match – boom! you got your currently selected … Read more

Adding Post Counts to Menu (Nav) Programmatically?

WordPress’ get_categories() function returns an array of category objects, each of which has a “count” property for the number of posts in that category. So something like this would get you a list of links to category pages: $categories = get_categories(); $markup = ‘<ul>’; foreach( $categories as $category ) { $catName = $category->category_nicename; $count = … Read more

Links open only on new tab or window

Links open in new Tab or Window if the link <a> is added using target=”_blank” (either from HTML or JavaScript). I’ve just checked your site and saw only Twitter links open in new Tab / Window. Must be from the plugin you are using to generate the Twitter feed. Note: JQMIGRATE is installed by WordPress … Read more

Create a Widget Area in the Navigation Bar for the Genesis Theme Framework?

You are adding filter, not an action. I don’t know how Genesis hook works, but native wp_nav_menu_items passes (and expects back) markup of custom menu items. Instead of echoing your additional stuff you should append it to input and return. This is clearly how it’s done in tutorial you linked to: add_filter(‘wp_nav_menu_items’,’follow_icons’,10,1); function follow_icons($output) { … Read more

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