Styling Active Links Within WordPress

You will have to set #menuwrap ul li.current-menu-item a to the color and style you want. The Problem is actually a CSS issue – because the CSS is more specific if an ID of an element is defined (like in your #menuwrap ul li a), so the above definition is even more specific and is … Read more

Can’t remove menu items added by plugin

I’ll assume you’re calling it in your functions.php file? If that’s the case, likely the plugin is adding the menu item after you’re call is being called. Try placing it in the admin_init() hook, at the very end. if ( ! function_exists( ‘remove_wp_menu_items’ ) ) { function remove_wp_menu_items() { remove_submenu_page( ‘themes.php’, ‘theme-editor.php’ ); } } … Read more

How to change the menu color

Is this the answer you’re looking for? Go to your .css file and replace this #access { background: linear-gradient(rgb(37, 37, 37), rgb(10, 10, 10)) repeat scroll 0% 0% transparent; box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.4); clear: both; display: block; float: left; margin: 0px auto 6px; width: 100%; } With this #access { background: … Read more

WP Nav Menu: String replacements

Why does this need to be done programmatically? WordPress’s menu editor lets you manually add a CSS class. If you aren’t seeing this option then look in the top, right of your screen for the “Screen Options” and click it so that it expands. Then check “CSS Classes”.

How can I disable sorting/dragging of a menu item in the custom menu admin?

The following does the trick: add_action( ‘admin_footer-nav-menus.php’, ‘block_sortables_wpse_90610’ ); function block_sortables_wpse_90610() { ?> <script type=”text/javascript”> jQuery(document).ready(function($) { $(“dt.menu-item-handle”).sortable({ disabled: false }); }); </script> <?php } This also works: sortable(false). Docs: http://api.jqueryui.com/sortable/#option-disabled

Display all submenus

Ok, the problem in my solution was the use of $menu_item->ID instead of $menu_item->object_id. So the full correct logic is like so: function print_sub_menus() { global $post; // get current page $post_id = $post ? $post->ID : -1; $has_post_parent = $post && $post->post_parent; $top = $has_post_parent ? array_pop( get_post_ancestors($post_id) ) : $post_id; // get all … Read more

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