Header and Footer options in pages and posts

You can do this by Using template page as well as custom fields. Let us say your custom fields value are 1 and 2 for header your conditions will be. if($header==1) { get_header(1); } else {get_header();} And similarly for footer it will be if($footer==1) { get_footer(1); } else { get_footer(); }

How to Supply Console Logs Data into the WooCommerce Cart?

After doing lots of research I got my result with below code. To achieve final result I have to install WC Fields Factory plugin and pass dynamic value using console log or variable def Use this code under .js file and make sure it’s getting trigger when button is getting click. $w.event.subscribe(“item.book.click”, function(item) { $(‘[name=”room_type”]’)[0].value … Read more

how to indicate on post listing title if user already liked this post

Judging by the code for that like system, you should be able to find out if the user has liked the post like this: if ( is_user_logged_in() ) { $likes = get_user_meta( get_current_user_id(), ‘_liked_posts’, true ); if ( is_array( $likes ) && in_array( get_the_ID(), $likes ) ) { echo ‘<span class=”liked”>Liked</span>’; } } That will … Read more