I have created a custom post "company" and custom category "company category". I have a question here, I want to hide child category post in primary category.
- Primary Category "First"
- Sub Category "Second"
I've created two posts "Fname" and "Sname". "Fname" was assign to First category and "Sname" assign to Second Category. I don't want show "Sname" in First category but just "Fname" be display on First category.
Is this possible?
I found a plugin solutions, Just One Category, But all of them are used for normal post type , not custom post type.
I try edit the code like this:
$q_args = array( 'paged' => $glocal_search_pageds, 'post_type' => array('company'), 's' => $s, 'company_category' => $company_category, 'posts_per_page' => $companyprp, 'orderby' => $orderby, 'order' => $order, 'tax_query' => array( array( 'include_children' => false ) ) );