WordPress
October 13, 2021

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.

‘post’,
‘orderby’ => ‘ID’,
‘post_status’ => ‘publish’,
‘order’ => ‘DESC’,
‘posts_per_page’ => -1
);
$result = new WP_Query( $args );
if ( $result-> have_posts() ) : ?>
have_posts() ) : $result->the_post();
update_post_meta( get_the_ID(), ‘site-sidebar-layout’, ‘right-sidebar’ );
endwhile;
endif;
wp_reset_postdata();
}

?>

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 Remove Website URL Field from WordPress Comment Form

Use Following Code in your current themes functions.php file it removed website url field from comment form.

Create Custom Repeater Control Elementor

Easy way to create Repeater control widget for Elementor. Create wc-custom-post-widget.php file and include its to functions.php file(This file is located in your theme folder). You can use below code to include file wc-custom-post-widget.php. include 'wc-custom-post-widget.php'; Elementor has a special type of control called a Repeater, which can contain other controls.Repeaters create sub-items that are […]

Redirect to Checkout after add to cart WooCommerce

Redirecting the user to the checkout page when they’ve added a product to their cart. This may come in handy if you only sell one product / one product per time. The filter woocommerce_add_to_cart_redirect makes it easy to redirect user to custom page. Code goes in function.php file of your active child theme (or active […]

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

WordPress Change Password Form Without Plugin

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


Leave a Reply

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