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


Add ACF Options Page in WordPress

To create an options page, open up your current themes functions.php file and add the following code: Without passing any parameters to this function, the default options page will be added to your wp-admin sidebar.

Display Popular Tags in WordPress

you’ll need to add following code to your current themes functions.php file.

Creating Custom Options Pages in WordPress

To create a menu for theme setting in the WordPress admin, you should use the Settings API provided by WordPress. Using this API, you can register a new options page, with fields for settings. Additionally, you can add settings to an existing options page. That being said, let’s add the following code to the main […]

How to Change the Order of Comment Form Fields in WordPress

If you want to put the comment field after all other fields are loaded. Add the following code in your current themes functions.php file.

how to Upload WordPress Custom Meta Box Image

Hi, here i implement multiple image upload custom fields (WordPress custom meta box image upload ) to page post type if you want it for another post type just change post type name. Add the following code to your current themes function.php file. Go to your pages from WordPress admin and check that multiple image […]

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.


Leave a Reply

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