How to add a class name to the ancestor of a post?
How to add a class name to the ancestor of a post?
How to add a class name to the ancestor of a post?
I expect that the theme_location is “footer” not “Footer”. It is case sensitive. I just checked. If you use a bad theme_location wp_nav_menu will fallback to what looks like a page menu when I test it. Edit: Due to additional information in the question, the theme_location is footer-menu and not footer. If you look at … Read more
How to load jquery tag-it plugin into admin?
Clearly this is because the ID you are passing to get_category is wrong (false or 0). i don’t know how you configured the taxonomy add on but do a vaR_dump and double check what data the get_field function is returning, maybe it’s an array with a single value in it : get_category(array_pop(get_field(‘category_test’)));
if you have the attachment (image) id, you ca use : wp_get_attachment_image_src( $attachment_id, $size); where $size is the smaller version you want. (see http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src) If you don’t know the attachment id you may query the database for full image size url : http://pippinsplugins.com/retrieve-attachment-id-from-image-url/
You can filter wp_nav_menu_objects and add the classes in one rush. You don’t even need a custom walker for that. add_filter( ‘wp_nav_menu_objects’, ‘add_has_children_to_nav_items’ ); function add_has_children_to_nav_items( $items ) { $parents = wp_list_pluck( $items, ‘menu_item_parent’); foreach ( $items as $item ) in_array( $item->ID, $parents ) && $item->classes[] = ‘has-children’; return $items; } The class has-children will … Read more
$the_args = array ( ‘post_type’ => ‘jobs’, the_field(‘job_category’) ); The trouble here is that the_field( ‘job_category’ ) prints data, so using it to build an array is pretty much useless. You’re left with literally post_type = job. However, the real problem is that you actually need to grab the category options, not the posts that … Read more
you should put that in the functions.js file (create it if it does not exist), and make sure it is embedded in your wordpress site with wp_enqueue_script in your functions.php file in your theme.
I think you need a join. $myquery = $wpdb->get_col( $wpdb->prepare( “SELECT DISTINCT meta_value FROM $wpdb->postmeta INNER JOIN $wpdb->posts ON $wpdb->postmeta.post_id = $wpdb->posts.ID WHERE meta_key = %s AND post_status IN (‘publish’)”, $metakey ) );
Is it possible to upload files for wordpress importer over FTP?