Disable WordPress Admin Bar

Disable WordPress Admin Bar Disable Admin Bar for everyone // Disable Admin Bar for everyone if (!function_exists(‘df_disable_admin_bar’)) { function df_disable_admin_bar() { // for the admin page remove_action(‘admin_footer’, ‘wp_admin_bar_render’, 1000); // for the front-end remove_action(‘wp_footer’, ‘wp_admin_bar_render’, 1000); // css override for the admin page function remove_admin_bar_style_backend() { echo ‘<style>body.admin-bar #wpcontent, body.admin-bar #adminmenu { padding-top: 0px !important; […]

Removing Quick Edit option from wordpress rows

Removing Quick Edit option from wordpress rows Add this to the theme function File. function remove_stuff ( $actions ) { if( !is_super_admin() && !current_user_can( ‘edit_theme_options’ ) ) { unset($actions[‘inline hide-if-no-js’]); return $actions; } else { return $actions; } } add_filter ( ‘page_row_actions’ , ‘remove_stuff’ ); add_filter ( ‘post_row_actions’ , ‘remove_stuff’ );

Removing Add Media option from WordPress Editor

Removing Add Media option from WordPress Editor In Many ways many users doesn’t need the “Add Media” option to add image in the wordpress content editor. Those who wants to remove it can do like below to get rid of this. Add the below code to theme function function z_remove_media_controls() {     remove_action( ‘media_buttons’, ‘media_buttons’ );} […]

Short description with limit in Woocommerce product page

Short description with limit in Woocommerce product page To do so go to your woocommerce plugin directory like below wp-content/plugins/woocommerce/templates And find the php file named content-product.php  . After that just add the flowing code below Here you can change the limit of character you want to display in short description. In the above code […]