Wait a minute... This content is very very old. We no longer sell or support this theme version. New Topics
Version 9
Yosef jebara
0 points
Beginner
This how to show sub categories of the clicked category page :
1- Download and install the php widget plugin from https://wordpress.org/plugins/php-code-widget/ or any other plugin that will let you excute php and activate it.
2-go to wordpress menu > appearance > widgets > drag the “php code” widget to the top of right column side bar .
4- The code now shows everywhere so let’s prevent that by doing the following
a. Select “Show widget if ALL active conditional tags return FALSE
b. Drag and drop “in_home” and “in_singular”
c. click the options icon of “in_singular” and click “listing_type” and click ok .
the “in_home” will prevent it from showing in the homepage and “in_singular” will prevent it from showing in the actual listing when viewed.
You can after that start playing with the styles as you wish .
This how to show sub categories of the clicked category page :
1- Download and install the php widget plugin from https://wordpress.org/plugins/php-code-widget/ or any other plugin that will let you excute php and activate it.
2-go to wordpress menu > appearance > widgets > drag the “php code” widget to the top of right column side bar .
3- insert the Following code :
<?php
$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
if ($term->parent == 0) {
wp_list_categories('taxonomy=listing&depth=1&hide_count=0
&hide_empty=0&title_li=&child_of=' . $term->term_id);
} else {
wp_list_categories('taxonomy=listing&hide_count=0
&hide_empty=0&title_li=&child_of=' . $term->parent);
}
?>
4- The code now shows everywhere so let’s prevent that by doing the following
a. Select “Show widget if ALL active conditional tags return FALSE
b. Drag and drop “in_home” and “in_singular”
c. click the options icon of “in_singular” and click “listing_type” and click ok .
the “in_home” will prevent it from showing in the homepage and “in_singular” will prevent it from showing in the actual listing when viewed.
You can after that start playing with the styles as you wish .
See screenshot
Good Luck and do it at your own risk !
Attachments:
You must be logged in to view attached files.Members Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login Now