Search results for: admin
Allow SVG Files Upload
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types.…
Remove WordPress Version Number
add_filter('the_generator', '__return_empty_string');
Disable Gutenberg Editor (use Classic Editor)
add_filter('gutenberg_can_edit_post', '__return_false', 5); add_filter('use_block_editor_for_post', '__return_false', 5);
Current Year
function current_year_shortcode() { return date('Y'); } add_shortcode('year', 'current_year_shortcode');
Remove Gutenberg CSS
//Remove Gutenberg Block Library CSS from loading on the frontend function smartwp_remove_wp_block_library_css(){ wp_dequeue_style( 'wp-block-library' ); wp_dequeue_style(…
Remove Unused JS
/** * We will Dequeue the jQuery UI script as example. * * Hooked to the…
Stop Lazy Load
add_filter( 'wp_lazy_loading_enabled', '__return_false' );
Ensure Webfont is Loaded
add_filter( 'elementor_pro/custom_fonts/font_display', function( $current_value, $font_family, $data ) { return 'swap'; }, 10, 3 );
Remove Google Fonts
add_filter( 'elementor/frontend/print_google_fonts', '__return_false' );
Explicit Fixed Width and Height
add_filter( 'the_content', 'add_image_dimensions' ); function add_image_dimensions( $content ) { preg_match_all( '/]+>/i', $content, $images); if (count($images) <…
Showcase IDX plugin - Replace all Permalink URLs with current URL in Schema
This snippet replaces all the Permalink URLs with the current URL in Schema markup.
Accordion Template Helper
This snippet will allow you to use Section Divider fields in an "accordion-like" manner by adding…
Untitled Snippet
HTML5
Whitelist Callback Functions for use in Theme Elements
Various elements in the Total theme allow you to select a callback function for the output…
Add Custom Dynamic Variables
The Total theme allows you to use "Dynamic Variables" in various element text fields such as…