Archives: Snippets
rexing
Duplicate Post/Page Link
// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading
Disable Gutenberg Code Editing for Non-Admin Users
add_filter( ‘block_editor_settings_all’, function ( $settings ) { $settings[‘codeEditingEnabled’] = current_user_can( ‘manage_options’ ); return $settings; } );Continue reading
Waste Licence
vohungy.com.vn
Tyler Hall Tech Custom Snippets
// Custom PHP Code by Tyler (TITLE) function page_title_sc( ){ return get_the_title(); } add_shortcode( ‘page_title’, ‘page_title_sc’ ); // Enable Shortcode Execution in Text Widgets add_filter( ‘widget_text’, ‘do_shortcode’ ); // Disable Gutenberg Editor (use Classic Editor) add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 5); add_filter(‘use_block_editor_for_post’, ‘__return_false’,…Continue reading
WooCommerce number of archive products per page
/* Change WooCommerce Archive products number per page */ add_filter( ‘loop_shop_per_page’, ‘my_new_products_per_page’, 9999 ); function my_new_products_per_page( $pr_per_page ) { $pr_per_page = 16; return $pr_per_page; }Continue reading
Rael Facial Wipes Banner
Remove Login Shake Animation
add_action( ‘login_footer’, function () { remove_action( ‘login_footer’, ‘wp_shake_js’, 12 ); } );Continue reading