Hide woocommerce category name from specific pages

Let’s assume you have a custom page with the name/title “Hello”. and add the following code to your themes functions.php or you can also create your own plugin. Code snippet: function my_custom_page_category_hide(){ $page_title = $wp_query->post->post_title; if($page_title==”Hello”){ echo ‘<style> .box-text-inner { display: none !important; } </style>’; } } add_action( ‘wp_head’, ‘my_custom_page_category_hide’ ); Just paste the above … Read more

Hide woocommerce category name from specific pages

Let’s assume you have a custom page with the name/title “Hello”. and add the following code to your themes functions.php or you can also create your own plugin. Code snippet: function my_custom_page_category_hide(){ $page_title = $wp_query->post->post_title; if($page_title==”Hello”){ echo ‘<style> .box-text-inner { display: none !important; } </style>’; } } add_action( ‘wp_head’, ‘my_custom_page_category_hide’ ); Just paste the above … Read more

Take all produts by category

category_name is for category taxonomy, sense products use the product_cat you will need to add a tax_query into $args. Like this. $args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => 20, ‘tax_query’ => [ ‘taxonomy’ => ‘product_cat’, ‘field’ => ‘name’, ‘terms’ => ‘trofee’, ], ‘meta_query’ => array( ‘relation’ => ‘OR’, array( // Simple products type ‘key’ … Read more