How to add schema markup to WordPress menu function

To get that kind of control you will probably need to create a custom Walker. Take a look at the defaults for wp_nav_menu() $defaults = array( ‘theme_location’ => ”, ‘menu’ => ”, ‘container’ => ‘div’, ‘container_class’ => ”, ‘container_id’ => ”, ‘menu_class’ => ‘menu’, ‘menu_id’ => ”, ‘echo’ => true, ‘fallback_cb’ => ‘wp_page_menu’, ‘before’ => … Read more

Change WooCommerce add_to_cart Button Text?

It’s not working because: get_the_terms( $post->ID, ‘product_cat’ ) yields an array of objects, to test against those objects you have to run a loop and pull a $term_id property out of each object. WordPress to the rescue! WordPress has a helper method for that… has_term(330,’product_cat’, $post); Use the has_term method to satisfy your conditional.

Add loggedout class on body using a function or JS

Presumably your theme is using the body_class function to output classes. You can add a filter to remove or add your own classes. function wpd_logged_out_body_class( $classes ) { if( ! is_user_logged_in() ){ $classes[] = ‘loggedout’; } return $classes; } add_filter( ‘body_class’, ‘wpd_logged_out_body_class’ );

Do we need to change our child function.php to require/include child dir files when we add an over-riding file.php into the child theme

Ok, the first-thing I wanted to double-check is that rather than make any modifications to parent PHP, you simply create one with a duplicate name in the child directory which completely overrides the parent file? No. You don’t create a theme with the same name. You create a theme with whatever name you choose and … Read more

WordPress can’t get jquery/unslider to work

$(document).ready(function(){ alert(“test”); }); It could be that your jQuery is working in compatibility mode. Try replacing $ with jQuery: jQuery(document).ready(function(){ alert(“test”); }); Edit: As per the author edit on the post: jQuery(document).ready(function(){ jQuery(‘.automatic-slider’).unslider({ autoplay: true }); });