jQuery append only works if I select html in admin section [closed]

These three lines work as expected , There is a problem maybe with other code before these lines that prevent the execution of your script; In case just fire the browser console in this page and try them here $( “html” ).append( “<div id=’bf_rsvp_note_display’></div>” ); $( “body” ).append( “<div id=’bf_rsvp_note_display’></div>” ); $( “.topbar” ).append( “<div … Read more

How to get Woocomerce categories count

If anyone needs it $args = array( ‘type’ => ‘product’, ‘parent’ => get_queried_object_id(), ‘orderby’ => ‘term_group’, ‘hide_empty’ => true, ‘hierarchical’ => 1, ‘taxonomy’ => ‘product_cat’, ‘pad_counts’ => false ); $cats = get_categories( $args ); print_r(count($cats));

Where to adjust presets for slider options “auto rotate” (3, 5, 10, 15 seconds)? [closed]

In anybody needs this in the future I found a quick and easy workaround: you could just adjust the slider interval in the shortcode. First you have to switch to the “classic mode” (turn the Visual Composer off) and then find the shortcode that defines the interval: [vc_gallery interval=”10″ images=”22390,23006″ img_size=”full”] You can then set … Read more

Filter Query Post by Custom Fields(by date)

As already said, your query arguments are slightly off – meta_query should be an array of arrays: $query = new WP_Query( array( ‘category_name’ => ‘events’, ‘order’ => ‘DESC’, ‘orderby’ => ‘meta_value’, ‘meta_query’ => array( array( ‘key’ => ‘start_date’, ‘value’ => strtotime( ‘today’ ), ‘compare’ => ‘>=’, ‘type’ => ‘UNSIGNED’, // Ensure MySQL treats the value … Read more

How to find the page of specific post?

This question isn’t really great, as it’s well documented in many places, but the answer is: View the page source, and look in the “open” body tag. It should show something like: <body class=”single single-post postid-29654 … > This example the page id/post id is 29654

Hide page for user logged and redirect for profile? [duplicate]

Not tested but should work add_action(‘wp’, function() { $url = home_url(‘my-profile/’); // profile url here if(is_user_logged_in()){ if(is_front_page() || is_home()){ wp_redirect($url); exit; } } }); Edit: I hooked into wp so the functions in the conditional will work. Add the above snippet of code to your child theme’s functions file, after you edit the $url on … Read more

How do I load this jQuery to my wordpress page?

I would download the jquery.mixitup.min.js and place it in the same folder as your custom script (js), also makes sense to place the “main.js” file in there also, keeping your js together, if you can. Not sure if your using a child theme or not,if not but add the following to your functions file, overwriting … Read more