function bake_my_wp_remove_storefront_sidebar() { if ( is_woocommerce() || is_checkout() ) { remove_action( ‘storefront_sidebar’, ‘storefront_get_sidebar’, 10 ); } } add_action( ‘get_header’, ‘bake_my_wp_remove_storefront_sidebar’ );Continue reading
add_filter( ‘storefront_woocommerce_args’, ‘bbloomer_resize_storefront_images’ ); function bbloomer_resize_storefront_images( $args ) { $args[‘single_image_width’] = 1500; $args[‘thumbnail_image_width’] = 600; $args[‘gallery_thumbnail_image_width’] = 1500; return $args; }Continue reading
add_action( ‘init’, ‘jk_remove_storefront_handheld_footer_bar’ ); function jk_remove_storefront_handheld_footer_bar() { remove_action( ‘storefront_footer’, ‘storefront_handheld_footer_bar’, 999 ); }Continue reading
add_action(‘woocommerce_archive_description’, ‘custom_archive_description’, 2 ); function custom_archive_description(){ if( is_product_category() ) : remove_action(‘woocommerce_archive_description’, ‘woocommerce_taxonomy_archive_description’, 10 ); add_action( ‘woocommerce_after_main_content’, ‘woocommerce_taxonomy_archive_description’, 5 ); endif; }Continue reading
// Create the settings page function restrict_user_posts_settings_page() { add_options_page( ‘Restrict User Posts Settings’, ‘Restrict User Posts’, ‘manage_options’, ‘restrict-user-posts-settings’, ‘restrict_user_posts_settings_page_content’ ); } add_action(‘admin_menu’, ‘restrict_user_posts_settings_page’); // Display the settings page content function restrict_user_posts_settings_page_content() { ?>Continue reading
function limit_media_files($file) { // Get the current user ID $current_user_id = get_current_user_id(); // Query media files for the current user $media_files = new WP_Query(array( ‘post_type’ => ‘attachment’, ‘post_status’ => ‘inherit’, ‘posts_per_page’ => -1, ‘author’ => $current_user_id )); // Check if…Continue reading
function count_user_media_files() { // Check if the current page is the media library $screen = get_current_screen(); if ($screen->id !== ‘upload’) { return; } // Get the current user ID $current_user_id = get_current_user_id(); // Query media files for the current user…Continue reading