Hi Deep,
Sorry for the delay in response, our forums are a bit busy at the moment as well as we are short staffed.
However answering your questions.
Part-1: How to design parent and child categories differently?
Right here we have to make a clear distinction in what you are talking. If you are referring to the a view, then we can do this with a view in view setup.
However if it is an Archive we will need a way to check if the term has a parent
With this we can load a different content template for your archive depending on if the term has a parent or not.
In order to do this we will definitely need to use some custom code to check.
So for the parent archive you will display a view listing the child terms, however for the child you will display the list of posts.
A custom shortcode that you can use to check if the term has a parent is the on below.
function wp_get_term_parent( $atts ) {
// Attributes
$atts = shortcode_atts(
array(
'slug' => '',
'taxonomy' => '',
),
$atts
);
$term = get_term_by('slug',$atts['slug'],$atts['taxonomy']);
if ($term->parent != 0){
return true;
}
}
add_shortcode( 'get_term_parent', 'wp_get_term_parent' );
This shortcode is used like this below.
[get_term_parent slug="[wpv-taxonomy-slug]" taxonomy="category"]
The shortcode will return the number 1 if the term has a parent. With this you can then use our conditional shortcode to check if the custom shortcode returns a 1 or not.
Example
[wpv-conditional if="('[get_term_parent slug='[wpv-taxonomy-slug]' taxonomy='category'] ne '1')"] View that list child terms here[/wpv-conditional]
[wpv-conditional if="('[get_term_parent slug='[wpv-taxonomy-slug]' taxonomy='category'] eq '1')"] View that list Posts of the child term being viewed here[/wpv-conditional]
Now in order to use the shortcode you will first need to add it to the Toolset custom code section in Toolset -> Settings -> Custom code and then activate it.
To use it in the conditional shortcode you will need to add it to the 3rd party shortcode arguments section in Toolset -> Frontend . Add the shortcode name get_term_parent.
Please let me know if this helps.
Thanks,
Shane