Get categories within specific term

I have a WooCommerce shop, where I’d like to show every possible product category, where the products have a specific attribute (term). Say I have a product attribute called: “Designer”, then I wish to find all the categories where products have attribute Designer => “Nike”.

So essentially the output would be:

Nike categories:

  • Shoes
  • Hats
  • Pants

Any pointers in the right direction where I can solve this?

How to get all posts from parent and children categories?

I am trying to get all posts from category products. My template looks like this: /products/PARENT_CATEGORY/CHILD_CATEGORY. What I need is all the posts from every CHILD_CATEGORY.

I try to access it via /posts?categories=28, but it returns no posts, as the category with ID of 28 doesn’t have any posts itself. But its child, for example, category with ID of 40, has some posts. Should I access them like /posts?categories=40,41,42...? Or there is another way to do it?

Plugin/template to distribute images into different pre-existing categories?

I’m working on an interface that needs to enable the user to upload 15-200 images and then distribute the images into different categories. The images will be fairly sequential; i.e. images 1-3 go into category A, 4-10 into category B, image 11 into category C, images 12-40 into category D, etc.

Some categories are mandatory and some are optional.

Any recommendations for existing plugins or templates for this functionality?

How do i display all categories of a custom post type and have respective page for them?

I made a custom Post type named Blogs which is like this on the function.php

function blog_post() { $  labels = array( 'name'               => _x( 'Blogs', 'post type general name' ), 'singular_name'      => _x( 'Blog', 'post type singular name' ), 'add_new'            => _x( 'Add New Blog', 'blog' ), 'add_new_item'       => __( 'Add New Blogs' ), 'edit_item'          => __( 'Edit Blog' ), 'new_item'           => __( 'New Blog' ), 'all_items'          => __( 'All Blogs' ), 'view_item'          => __( 'View Blog' ), 'search_items'       => __( 'Search Blogs' ), 'not_found'          => __( 'No blog found' ), 'not_found_in_trash' => __( 'No blog found in the Trash' ),  'parent_item_colon'  => '', 'menu_name'          => 'Blogs' ); $  args = array( 'labels'        => $  labels, 'description'   => 'Holds blogs and blog specific data', 'public'        => true, 'menu_position' => 5, 'supports'      => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments' ), 'has_archive'   => true, );  register_post_type( 'blogs', $  args );  } add_action( 'init', 'blog_post' );  function blog_categories() { $  labels = array( 'name'              => _x( 'Blog Categories', 'taxonomy general name' ), 'singular_name'     => _x( 'Blog Category', 'taxonomy singular name' ), 'search_items'      => __( 'Search Blog Categories' ), 'all_items'         => __( 'All Blogs Categories' ), 'parent_item'       => __( 'Parent Blog Category' ), 'parent_item_colon' => __( 'Parent Blog Category:' ), 'edit_item'         => __( 'Edit Blog Category' ),  'update_item'       => __( 'Update Blog Category' ), 'add_new_item'      => __( 'Add New Blog Category' ), 'new_item_name'     => __( 'New Blog Category' ), 'menu_name'         => __( 'Blog Categories' ), );  $  args = array( 'labels' => $  labels, 'hierarchical' => true, ); register_taxonomy( 'blogs', 'blogs', $  args ); } add_action( 'init', 'blog_categories', 0 ); 

So i made the Custom Post type like this

Now i created Post on the Blogs with Categories as Everything, Who, Where now i want to have a page which displays all categories and when i click respective category name i want to have a page which shows pages as per the categories So i wrote a code on blog.php

<?php $  args = array(            'taxonomy' => 'blogs',            'orderby' => 'name',            'order'   => 'ASC'        );  $  categoriess = get_categories($  args);  foreach($  categoriess as $  cat) { ?>   <a href="<?php echo get_category_link( $  cat->term_id ) ?>">        <?php echo $  cat->name; ?>   </a> 

So this code just shows Blog categories but i am super confused which page should i write the code for each categories and stuff please help me?

Best way to display categories tree in mobile apps

I’m developing a little hybrid mobile application, it is an e-commerce app, I’ve designed all from scratch. I am designing it in such a way that the admin at anytime can add categories and subcategories, and so on. There could be cases like this (although they may be a bit rare cases):

Category 1   Category 1.1   Category 1.2   Category 1.3     Category 1.3.1       Category     Category 1.3.2     Category 1.3.3 Category 2 Category 3 

I would like to know what is the best way to do this? As a CSS framework I am using Materialize.

How would you advise me, to browsing this section?

Initially, if they were just categories (without children). I would make an accordion, or what in Materialize is called Collapsible. And then when the user clicks on an item, a list with all the products is opened below.

What are the best practices on this type of applications? Should I just show a small list of products and when the user clicks, go to a specific page of that product?

Thunderbird Lightning: How to edit categories?

To edit the categories in the thunderbird lightning calendar could go to Tools -> Options -> Lightning -> Categories, but in the current version (60.3) this doesn’t seem to be possible anymore as Tools -> Options was removed. I also couldn’t find it under the Preferences.

How is it currently possible to edit the calendar categories (delete, change color etc)?

Synchronizing Outlook Calendar Categories with a Sharepoint calendar using email address assigned to SP calendar

I have a SharePoint calendar configured with an incoming email and want to populate events with categories in the SharePoint calendar by sending events from Outlook to SharePoint. I have the same categories in Outlook and in the SharePoint calendar.

When I enter in Outlook an event with a category directly in the SharePoint calendar connected to Outlook, then the category is correctly updated in the calendar on SharePoint.
However, when I create an event with the same category in Outlook using my Outlook Exchange Account and send the event to the SharePoint calendar’s incoming email address, then the event in SharePoint does not contain the category.

Has anyone been able to get this to work or has suggestions for workarounds using the incoming email feature?

We are using Outlook 2013 and Sharepoint 2013.

Two types of product categories on shop page

I’m hoping someone can help me out with what i’m trying to do currently.

I’m using widgets to show the categories on my shop page, and I want to add two types of product categories in it. The first product category would show the paint type, if it is water based or solvent based. And the second category would show only lists of paint by surface, if it is for metal or for wood.

I’ve tried to find answers from google, but I can’t seem to find what i’m looking for. I found that I can exclude some categories on my shop page, but it really won’t do since I need to show two differnt categories and excluding will only help if I have one.

I wonder how can I do this? I’ll attach a photo so hopefully someone can get what i’m trying to say.

enter image description here

Read GET parameters in APACHE Mod Rewrite rules for WordPress categories in Posts

I’m a self-taught programmer with a very little experience in WordPress programming. I’m using a post permalink structure in this way:

I want to have the possibility to optionally have URLs with two “parameters”, “routes”, “deepth-levels” like this:

With APACHE’s mod_rewrite I know I can “convert” a URL like: in some like:

But, in WordPress, how can I do this without messing all the other URLs and routing process-flow? My goal is read the GET params name and color in the functions.php file so I can make some code with that.


I think that a mod_rewrite rule for “converting” / accepting URLs like this in something like this would do the trick! Using add_rewrite_url()

Thanks for reading.