How to change first letter of active menu item

1. CSS ::first-letter The first option is selector CSS ::first-letter. li.menu-item.active a::first-letter { color: red; } The a tag inside menu should have display: block / display: inline-block. Note: The ::first-letter selector can only be used with block-level elements. 2. Filter nav_menu_item_title Another way is to use nav_menu_item_title filter and surround the first letter with … Read more

nav tag wrapping around dropdown

Setting specific min-width and max-width for your <nav> menu will fix the issue: <nav class=”navbar navbar-inverse navbar-fixed-top” role=”navigation” style=”min-width: 1000px; max-width: 1000px;”> Here’s the JavaScript/jQuery method that will set the min-width and max-width of your .navbar when the event ‘affix.bs.affix’ got fired: var navbar = jQuery(‘nav.navbar’); // If ‘affix.bs.affix’ is fired. navbar.on(‘affix.bs.affix’, function () { … Read more

Inserting a shortcode into a genesis menu?

The problem is the fact that you are trying to echo something into a string, echo should only be used to output something, so simply change the following line: $items .= ‘<li class=”myclass”>’ . echo do_shortcode(‘[shopping_cart]’) . ‘</li>’; To this: $items .= ‘<li class=”myclass”>’ . do_shortcode(‘[shopping_cart]’) . ‘</li>’; Edit: On another note, this is merely … Read more

Why don’t my custom menus show up in WPtouch Pro?

There are two solutions. The simplest is have you database tables start with wp_. Of course that is’t always an option, for example a multi-site install or a situation where you don’t control the host environment. I looked around other parts of the code, and they use {$wpdb->base_prefix} when constructing the SELECT queries, but for … Read more

Display sub menus as separate lists

I’ve decided to not change anything in walker class and “parse” the menu with jQuery, clone each children and append to “menu” container which gives me the result I was looking for. The only thing missing is how to pass ID of menu element which has childrens to start_lvl function. Thanks

my theme automatically adds new pages to menu

I analyze your hard code from functions.php and my only shot is in lines with header() php function. I can’t see clearly but they can redirect you and run some code twice. Please try to comment them and look if this is the reason.

Open WordPress Page from selected option dropdown

Looks like not many folks do this. Anyway here’s something that works for me to get drop-down select to go to WordPress page” <?php $my_title = $_POST[‘place’]; global $wpdb; $mypost = $wpdb->get_row( “SELECT * FROM wp_posts WHERE post_title=”” . $my_title . “” ” ); $permalink = get_permalink($mypost->ID); echo “<a href=$permalink><BR>Click Here to Go to Selection</a>”; … Read more

Creating an accordion style menu

The code for WordPress would be: wp_nav_menu() for custom nav menus wp_page_menu() as the default fallback for custom nav menus wp_list_pages() for a list of static pages See the linked Codex pages for the various parameters to pass to each, and the CSS classes output by each.

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