Deprecated: Required parameter $field follows optional parameter $i in /var/www/codexcoach.com/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-repeater.php on line 715

Deprecated: Required parameter $post_id follows optional parameter $i in /var/www/codexcoach.com/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-repeater.php on line 715

Deprecated: Required parameter $field follows optional parameter $i in /var/www/codexcoach.com/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-repeater.php on line 781

Deprecated: Required parameter $post_id follows optional parameter $i in /var/www/codexcoach.com/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-repeater.php on line 781

Deprecated: Required parameter $field follows optional parameter $name in /var/www/codexcoach.com/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-flexible-content.php on line 1052

Deprecated: Required parameter $field follows optional parameter $i in /var/www/codexcoach.com/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-flexible-content.php on line 1088

Deprecated: Required parameter $post_id follows optional parameter $i in /var/www/codexcoach.com/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-flexible-content.php on line 1088

Deprecated: Required parameter $field follows optional parameter $i in /var/www/codexcoach.com/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-flexible-content.php on line 1140

Deprecated: Required parameter $post_id follows optional parameter $i in /var/www/codexcoach.com/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-flexible-content.php on line 1140

Deprecated: Required parameter $field follows optional parameter $id in /var/www/codexcoach.com/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-gallery.php on line 300
Create Custom Template for Child Categories in Wordpress - CodeXCoach
WordPress
October 5, 2021

Create Custom Template for Child Categories in WordPress

Create different template only for child category put following code in your current themes functions.php file

category_parent > 0 ) {
$sub_category_template = locate_template(‘child-category.php’); // specify template name which you create for child category
$template = !empty($sub_category_template) ? $sub_category_template : $template;
}
return $template;
}

?>

Related Post


WordPress Register Form Without Plugin

Are you need simple register form without plugin for your WordPress website? Yes, Then i have created [wc_register_form] shortcode with quick simple code. So you can add register form anywhere like in Pages, Posts and Widget etc… Therefore you just need to put [wc_register_form] shortcode where you need register form. So you need to follow […]

How to Include JavaScript & CSS in WordPress

When we are customizing any wordpress theme using child theme at some time we need to enqueue any external CSS or JavaScript in site. In this case we can best way to include css and JavaScript in functions.php file. We can enqueue the JavaScript or CSS using wp_enqueue_script() or wp_enqueue_style() functions. CSS You can enqueue […]

Prevent svg translation of fontawesome icon

Add Following script in head so use below code in your current themes header.php file. And also you have to add following script before your fontawesome css link.

Mobile Menu Collapse Effect Divi

Right Now Divi is not providing collapse effect for mobile menu. So when we have many items its hard to manage menu on mobile. It’s a great way to customize the Divi mobile menu using CSS and jQuery. You have to put following code on your css and js files. Put below code on any […]

WordPress Forgot Password Form Without Plugin

Are you need simple Forgot Password form without plugin for your WordPress website? Yes, Then i have created [wc_forgot_pwd_form] shortcode with quick simple code. So you can put Forgot Password form anywhere like in Pages, Posts and Widget etc… Therefore you just need to put [wc_forgot_pwd_form] shortcode where you need login form. So you need […]

Get product details from $product object WooCommerce

I am publish this article for get values from WooCommerce $product object. You can get all information of product from $product object. When we have $product object. Get $product object by $product_id. Get $order object by $order_id. Get products from $cart object.


Leave a Reply

Your email address will not be published. Required fields are marked *