Add custom fields to Woocommerce Category Page
Add custom fields to Woocommerce Category Page
Add custom fields to Woocommerce Category Page
Yes if you just need to add a function you can put that in a new plugin. Plugins don’t have to be complicated: a single file with a header comment will do. e.g. see the Hello Dolly plugin bundled with WordPress.
This can be easily done from WordPress settings. Go to the admin panel of your WordPress site (also known as the Dashboard), and from the left menu, go to Settings ⟹ Permalinks: From there, you’ll see the Category base input field. Use the prefix you want in this input field, e.g. my-custom-prefix/category and then Save … Read more
Use same wordpress category base and tags as the prefix as the post permalink
Sort Category Archive pages and place sticky posts first
How to get specific number of category post on a page or category page?
I don’t know if your issue is cached values at all, but get_category() does cache results, so it’s a possibility. Here are some other options: $current_cat_id = get_query_var(‘cat’); $category = get_category($current_cat_id); // One possibility: $count_a = get_category_count( $category->slug ); // OR… another possibility: $count_b = wp_count_terms( $category->slug );
If you know the taxonomy slug of it you can use code below: $tax_slug = ‘product_cat’; $cpt_terms = get_term( $tax_slug ); echo ‘<pre>’; print_r( $terms ); echo ‘</pre>’; but if you don’t know the slug, you can use these method: First click on the taxonomy you want to see its terms. In the URL bar … Read more
As you said, you’ve a category (parent one) named as Oregon and its sub-category ‘Southern’, therefore, Oregon / Southern is the correct output. It seems others are in wrong order. If Oregon is parent for Willamette Valley and Central then the result should be: Oregon / Central Oregon / Willamette Valley Consider what hierarchy you … Read more
how do I exclude a category foreach