Blocks on templates

/** * Setting Hero Block on Pages by default. * */ function awesome_register_page_template() { $post_type_object = get_post_type_object( ‘page’ ); $post_type_object->template = array( array( ‘core/pattern’, array( ‘slug’ => ‘frost/hero’, ) ), ); } add_action( ‘init’, ‘awesome_register_page_template’ );Continue reading

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

VIsual Campaign Builder: Add HTML Tags To Display In The HTML/CODE Block

add_filter( ‘charitable_campaign_builder_html_allowed_tags’, ‘example_charitable_add_html_tags_to_html_visual_builder’, 10, 2 ); function example_charitable_add_html_tags_to_html_visual_builder( $allowed_html = array(), $campaign ) { // this replaces the default allowed tags with the following. Add or remove tags (and attributes) as needed. $allowed_html = array( ‘a’ => [ ‘href’ =>…Continue reading

Save images as WEBP

/** * Convert Uploaded Images to WebP Format * * This snippet converts uploaded images (JPEG, PNG, GIF) to WebP format * automatically in WordPress. Ideal for use in a theme’s functions.php file, * or with plugins like Code Snippets…Continue reading

Change Arabic Currency symbol to the currency short code

/** * change arabic currency symbol to short Currency name for AED, SAR, QAR , BHD , OMR , KWD */ add_filter( ‘woocommerce_currency_symbol’, ‘wc_change_uae_currency_symbol’, 10, 2 ); function wc_change_uae_currency_symbol( $currency_symbol, $currency ) { switch ( $currency ) { case ‘AED’:…Continue reading

Add Autofocus on Your Form

/* Add autofocus to the first form field of the form Original doc link: https://wpforms.com/developers/how-to-add-autofocus-on-your-form/ For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_autofocus() { ?>Continue reading