detect screen width in functions

According to codex, wp_is_mobile(); is a boolean function that returns true if the user is visiting the website on a mobile device, so what you need is: if ( wp_is_mobile() ) { // Run this only for mobile visitors add_filter( ‘wp_nav_menu_items’, ‘B_function’, 10, 2 ); function B_function(/* add B */ ); } else { //If … Read more

Querying custom fields with Carrington mobile theme

$post should be a post ID (so $post->ID if you’ve got the global $post object in scope) the function call parameters are: $id: the id of the post (integer) $keyname: a string containing the name of the custom field $single: boolean – true means return a string for the first value, false means an array … Read more

Mobile Menu Not Showing

Your menu appears to be a Custom Menu Widget instance. You have to add a Nav Menu via the Appearance > Menus section, the button only works with the menu assigned to the Primary Menu location.