WordPress Post Views Counter Function
function wpb_set_post_views($postID) { $count_key = 'wpb_post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ $count = 0; delete_post_meta($postID,…
MemberPress: Remove State Text Field
Removes the state text field from the registration and account pages if the country does not…
Disable Author Archive
A small Code that disable the WordPress Author Archive and redirect to the Homepage
Add the fields to the user edit screen
// Add the fields to user edit screen. add_action( 'show_user_profile', 'add_extra_user_fields' ); add_action( 'edit_user_profile', 'add_extra_user_fields' );…
Change Admin Panel Footer Text
Display custom text in the admin panel footer with this snippet.
webfontloader.js
// Add custom scripts function add_custom_script_webfont_loader_js() { wp_register_script( 'webfontloader', 'https://cdnjs.cloudflare.com/ajax/libs/webfont/1.6.28/webfontloader.js', array(), '1.6.28', true ); wp_enqueue_script( 'webfontloader'…
Delete Woocommerce images after deleting product
Automatically Delete WooCommerce Images After Deleting a Product. If you use the same image of multiple…
Sending Numerical Values Through Webhooks
This snippet allows you to send numbers through Webhooks as opposed to the default behaviour that…
Prevent Duplicate Cart Items
Prevents the same item from being added to the cart multiple times.
Contato
Entre em contato conosco, sugira, elogie, corrija, reclame
Disable default WordPress image sizes
// Disable default WordPress image sizes add_filter('intermediate_image_sizes', '__return_empty_array'); // Disable large scaled image size add_filter('big_image_size_threshold', '__return_false');…
How to Add BCC to Email Notifications (for all forms)
add_filter( 'wp_mail', function ( $args ) { // Add the BCC email address here $bcc_address =…
E-List
sign up for our e-news
Buy Now Button - Variation
add_filter( 'gettext', 'customizing_product_variation_message', 10, 3 ); function customizing_product_variation_message( $translated_text, $untranslated_text, $domain ) { if ($untranslated_text ==…