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 Login Form Without Plugin

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

Change Comment Form Title “Leave a comment” WordPress

comment_form_defaults filter allow to change comment form title “Leave a comment” to other custom text, filter comment_form_defaults help you to change it. Code goes in function.php file of your active child theme (or active theme).

How to Create Loop Element Using Visual Composer API

When we are making site with visual composer some time not possible to built some designs using visual composer elements. So at that time we need to use HTML element for built designs. But visual composer API provide facility to built own custom element for some special requirements and its very easy. We can built […]

Enable SVG Support in WordPress

For Enable svg support you’ll need to add the following code to your current themes functions.php file.

Custom Pagination in WordPress

For custom pagination Add Following code in your current themes functions.php file.

Enable Right Sidebar in WordPress all Post for Astra theme

Easy way to enable right sidebar in all wordpress post for astra theme add following code in your current themes function.php file.


Leave a Reply

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