WooCommerce – how to display product category title above product category images?

1). Copy the Template File Navigate to wp-content/plugins/woocommerce/templates/loop/ Find category.php Copy it to your theme at wp-content/themes/your-theme/woocommerce/loop/category.php 2).Modify the category.php File Open category.php in a code editor and update it to separate the title from the image: <?php /** * The template for displaying product category thumbnails within loops. */ if (!defined(‘ABSPATH’)) { exit; } … Read more

Category page 2 url doesn’t exist

The answer is to use pre_get_posts. See WordPress Pagination not displaying posts after certain page As Milo says “WordPress determines if a paginated page exists based on the results of the main query”. I was using a custom query that was setting posts_per_page to 5 but in Settings this value was set to 10. Using … Read more

Two related taxonomies. how to filter terms in second taxonomy depending on selected term in first taxonomy on Post edit page?

My approach would be: Hide city edition metabox, by setting public to false. I would override how metabox for country should render by using meta_box_cb parameter. You should provide callback for the function that will do the render. In this function, you first render the field for country, and then on choose you make an … Read more

WP_Query with multiple categories unexpected behavior

To get an array from a form POST into PHP, you have to name the form variable with square brackets: <html> <body> <pre> <?php var_export( $_POST ); ?> </pre> <form action=”” method=”post”> <label> 4<input type=”checkbox” name=”cats[]” value=”4″></label> <label> 5<input type=”checkbox” name=”cats[]” value=”5″></label> <label> 6<input type=”checkbox” name=”cats[]” value=”6″></label> <input type=”submit” value=”Submit”> </body> </html>