Show Featured products in product category pages

I just double checked and WooCommerce runs the product category description through the_content filters, which means that it should run shortcodes. WooCommerce has plenty of shortcodes, see their documentation Including featured products: [featured_products per_page=”12″ columns=”4″] The downside to that is that the featured products might not all be from that specific category. You didn’t mention … Read more

How to associate more than one user to a post?

Unless all these employees will need to login to WordPress, it may make much more sense to implement employees as a custom post type (a.k.a. CPT). Once they are defined as a CPT, you then associate wach employee with a company. As @swisspedy mentioned in his comment, one way to do this is with the … Read more

Customize WooCommerce Product Images (Placement and size) [closed]

The file responsible for generating the sidebar cart is mini-cart.php and is located in woocommerce/templates/cart/mini-cart.php What you do is you copy that file and paste it into YOURTHEMEFOLDER/woocommerce/cart/mini-cart.php Open up that file and edit line 40 where it contains <?php echo $_product->get_image(); ?>` Change that to <?php echo $_product->get_image( array( 50, 80 ) ); ?> … Read more

how can I link to a PlugIn admin-sub-menu page after processing a formular

Simply use add_query_arg(), remove_query_arg() and get_query_var(). On your page link, you use a simple query var like step=one. $query_arg = add_query_arg( ‘step’, ‘one’, $_SERVER[‘REQUEST_URI’] ); Then, when the user processed the form, you just reload the page. Then simply check if 0 !== get_query_var( ‘step’ ) AND ‘one’ !== get_query_var( ‘step’ ) and process further. … Read more

How to remove addthis from my default template

try grepping your entire wordpress folder for ‘addthis’. From your root: grep -irn “addthis” *. It’s bound to be in there somewhere. Check in wp-content, because you want to search through your themes and plugins. wp-includes is part of WordPress core so I doubt it would contain any references to AddThis.

Using jquery migrate for plugins incompatible with jquery 1.10.2

You have a syntax error in your wp_register_script() call: wp_register_script(‘curtain-instance’, get_stylesheet_directory_uri().’/curtain-instance.min.js’, array(‘curtain’,’jquery’,’jquery-migrate’), true ); You’re missing the version parameter: wp_register_script( // Handle ‘curtain-instance’, // Path get_stylesheet_directory_uri().’/curtain-instance.min.js’, // Dependencies array(‘curtain’,’jquery’,’jquery-migrate’), // Version // In footer? true ); Try adding that parameter: wp_register_script( // Handle ‘curtain-instance’, // Path get_stylesheet_directory_uri().’/curtain-instance.min.js’, // Dependencies array(‘curtain’,’jquery’,’jquery-migrate’), // Version ‘1.0’, // In … Read more

WooCommerce product search titles only

This is an 9 months question, but since I had the same issue and found a solution, I came here to post it. On file wp-content/plugins/woocommerce/classes/class-wc-query.php, function pre_get_posts( $q ), WooCommerce defines at line 114: add_filter( ‘posts_where’, array( $this, ‘search_post_excerpt’ ) ); This is the point when WooCommerce mess up your query! The function search_post_excerpt … Read more