Generate sitemap for WordPress GTranslate
https://github.com/renzramos/generate-sitemap-for-wordpress-gtranslate
Read moreEasy Transient integration for WP Query
What is Transient API? The Transients API is very similar to the Options API but with the added feature of an expiration time, which simplifies the process of using the wp_options database table to temporarily store cached information. Reference: https://codex.wordpress.org/Transients_API Function Add this yo your functions.php // wp query transient function wp_query_transient($transient_key, $args){ $query = […]
Read moreWordPress – Remove query version string from static resources
Add to theme functions.php // remove query string from static files function remove_script_version_query_string( $src ) { if( strpos( $src, ‘?ver=’ ) ) $src = remove_query_arg( ‘ver’, $src ); return $src; } add_filter( ‘style_loader_src’, ‘remove_script_version_query_string’, 10, 2 ); add_filter( ‘script_loader_src’, ‘remove_script_version_query_string’, 10, 2 );
Read moreHow to remove Google Analytics By MonsterInsights tracking code
Remove tracking code in Google Page speed test if (!stripos($_SERVER[‘HTTP_USER_AGENT’], ‘Speed Insights’) === false){ remove_action( ‘wp_head’, ‘monsterinsights_tracking_script’, 6 ); } Remove Action remove_action( ‘wp_head’, ‘monsterinsights_tracking_script’, 6 );
Read moreRemove emoji in WordPress source code
Add the following codes on your functions.php function disable_emojis() { remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 ); remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ ); remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ ); remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ ); remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ ); remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ ); remove_filter( ‘wp_mail’, ‘wp_staticize_emoji_for_email’ ); add_filter( ‘tiny_mce_plugins’, ‘disable_emojis_tinymce’ ); add_filter( ‘wp_resource_hints’, ‘disable_emojis_remove_dns_prefetch’, 10, 2 ); } add_action( ‘init’, ‘disable_emojis’); function disable_emojis_tinymce( […]
Read moreHow to rename Woocommerce order status?
Add the following code in your functions.php or custom plugin // rename processing to shipping function wc_rename_order_statuses( $statuses ) { foreach ( $statuses as $key => $status ) { $statuses[ $key ] = $status; if ( ‘wc-processing’ === $key ) { $statuses[‘wc-processing’] = _x( ‘Pending’, ‘Order status’, ‘woocommerce’ ); } if ( ‘wc-completed’ === $key […]
Read more