Convert WP Menu to a Drop Down for Mobile browser

Here’s what I’ve put together from different articles/themes: files to modify: functions.php header.php style.css js (create folder “js” in theme root directory) The Javascript: jQuery(function() { jQuery(“<select />”).appendTo(“nav”); jQuery(“<option />”, { “selected”: “selected”, “value” : “”, “text” : “Go to…” }).appendTo(“nav select”); jQuery(“nav a”).each(function() { var el = jQuery(this); jQuery(“<option />”, { “value” : el.attr(“href”), … Read more

Need help targeting a custom post type with conditional tags

You want the first parameter ($post_type) of register_post_type() – by default this is used for the “slug“, so in your case it’s: content-block The name and singular-name labels you refer to are just for display purposes – see get_post_type_object() for an example. So this should work (note I’ve not tested the rest of your advert … Read more

How to add a submenu toggle button inside all “li” elements that have a submenu?

I managed to solve this: Create the function So I created a new custom walker function in functions.php and copied all the code of the core wp nav walker function (wp-includes/class-walker-nav-menu.php). Check for a menu item that has children I then added this array_search in public function start_el to check if the parent element has … Read more

How to set different settings for a mobile theme?

Just wrap you code up in a conditional: if ( $GLOBALS[‘is_iphone’] ) { // do funky stuff for mini screens } global $is_iphone; will trigger TRUE for all mobile devices incl. tablets. Edit for WP 3.4+ Now there’s wp_is_mobile() to make checks for User-Agent. It’s basically a wrapper for $is_iphone and does the same.

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