Filter Code to increase SEO Analyzer timeout

add_filter( ‘http_request_args’, ‘aioseo_filter_analyzer_timeout’, 1, 2 ); function aioseo_filter_analyzer_timeout( $args, $url ) { if ( ‘https://analyze.aioseo.com/v1/analyze/’ === $url ) { $args[‘timeout’] = 120; } return $args; }Continue reading

Modify breadcrumbs homepage link

add_filter( ‘aioseo_breadcrumbs_trail’, ‘homeshop_breadcrumbs_trail’ ); function homeshop_breadcrumbs_trail( $crumbs ) { foreach ( $crumbs as &$crumb ) { if ( ‘homePage’ === $crumb[‘type’] ) { $siteLink = wp_parse_url( $crumb[‘link’] ); $crumb[‘link’] = $siteLink[‘scheme’] . ‘://’ . $siteLink[‘host’] . ‘/shop-displays/’; } } return…Continue reading

parallax

.parallax { background-image: url(“http://example.com/wp-content/uploads/2017/08/my-background-image.jpg”); height: 100%; background-attachment: fixed; background-position: center; background-repeat: no-repeat; background-size: cover; margin-left:-410px; margin-right:-410px; } .parallax-content { width:50%; margin:0 auto; color:#FFF; padding-top:50px; }Continue reading

Remove Gutenberg Blocks Library CSS

function adms_remove_wp_block_library_css(){ wp_dequeue_style( ‘wp-block-library’ ); wp_dequeue_style( ‘wp-block-library-theme’ ); wp_dequeue_style( ‘wc-blocks-style’ ); // Remove WooCommerce block CSS } add_action( ‘wp_print_styles’, ‘adms_remove_wp_block_library_css’, 100 );Continue reading

Upload font files to media library

add_filter( ‘upload_mimes’, function( $mimes ) { $mimes[‘woff’] = ‘application/x-font-woff’; $mimes[‘woff2’] = ‘application/x-font-woff2’; $mimes[‘ttf’] = ‘application/x-font-ttf’; $mimes[‘svg’] = ‘image/svg+xml’; $mimes[‘eot’] = ‘application/vnd.ms-fontobject’; return $mimes; } );Continue reading

Show local fonts in block editor

add_filter( ‘block_editor_settings_all’, function( $editor_settings ) { $css = wp_get_custom_css_post()->post_content; $editor_settings[‘styles’][] = array( ‘css’ => $css ); return $editor_settings; } );Continue reading