Jagdish Sarma | Reputations Jagdish Sarma652 QuestionsAnswersReputations Asked a question WP Call plugin function when creating or editing terms[apcode language="php"] /** Call function during edit category/taxonomy */ add_action('created_term','wp_custom_edit_taxonomy_update',1010); add_action('edited_term','wp_custom_edit_taxonomy_update',1010);... 13 hours ago 2 Asked a question WP Deregister a script and load new script from child theme[apcode language="php"] function custom_replace_hfe_script() { // if (!is_user_logged_in()) { // Deregister the existing script wp_deregister_script('hfe-frontend-js');... 2 days ago 2 Asked a question WP Fix 404 Js, CSS url with redirection[apcode language="php"] add_action('template_redirect', function () { if (is_404()) { $requested_url = $_SERVER['REQUEST_URI']; if (strpos($requested_url,... 2 days ago 2 Asked a question WP Update post meta based on another value[apcode language="php"] function sync_meta_fields_with_seo_meta_fields($post_id) { if (get_post_type($post_id) !== 'post') { return; } $meta_fields = [ 'SeoDescription'... December 18, 2024 2 Asked a question WP remove rel attribute from menu link[apcode language="php"] add_filter('nav_menu_link_attributes', 'remove_nofollow_from_menu_links', 99999, 3); function remove_nofollow_from_menu_links($atts, $item, $args) { if... December 17, 2024 2 Asked a question Woocommerce remove a function from different plugin[apcode language="php"] add_action( 'woocommerce_before_calculate_totals', 'remove_discount_using_dynamic_instance', 20 ); function remove_discount_using_dynamic_instance() { global... December 10, 2024 2 Asked a question AWS Lightsail Permission Fix Steps1 ) First you have to check your bitnami folder structure. This different than others. You can check this using FTP or you can connect the SSH and check. 2) For connect FTP or SSH you need to login lightsail... December 5, 2024 2 Asked a question WP Disable New User Email Notification[apcode language="php"] add_filter('wp_new_user_notification_email_admin', '__return_false');//admin add_filter('wp_new_user_notification_email', '__return_false');//user... November 22, 2024 2 Asked a question WP After media update get author details[apcode language="php"] function get_author_before_media_update($post_ID, $post_after, $post_before) { global $wpdb; if (get_post_type($post_ID) === 'attachment') { $author_before_update... November 22, 2024 2 Asked a question WP Write debug log with user actions including IP address[apcode language="php"] function getIPAddresslog() { if(!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; }... November 22, 2024 2 Asked a question WP Function to remove Quick Edit Button[apcode language="php"] function remove_quick_edit( $actions ) { unset($actions['inline hide-if-no-js']); return $actions; } add_filter('post_row_actions','remove_quick_edit',10,1);... November 22, 2024 2 Asked a question Modify Viewport Meta Tag in WordPress & Divi for AccessibilityFirst Remove Viewport Meta Tag [apcode language="php"] function remove_et_viewport_meta() { remove_action( 'wp_head', 'et_add_viewport_meta' ); } add_action( 'wp_head',... October 16, 2024 2 Asked a question Add blank cations in Video Element HTMLFirst create a Blank "captions_en.vtt" file and add text "WEBVTT" in the file than add the file url in below script [apcode language="jscript"] jQuery(document).ready(function($) { $('video').each(function()... October 16, 2024 2 Asked a question WordPress rename a text to another in frontend[apcode language="php"] add_filter( 'gettext', 'wpdocs_change_login_form_register_keyword' ); function wpdocs_change_login_form_register_keyword( $text ) { if ( is_checkout() )... July 8, 2024 2 Asked a question Ajax load content dynamically and store in browser for speed optimization[apcode language="jscript"] //New JS function getLocalStorageData(key) { var data = localStorage.getItem(key); return data ? JSON.parse(data) : null; } function setLocalStorageData(key,... June 27, 2024 2 Asked a question Tribe Events WordPress show latest event shortcode[apcode language="php"] // Add Shortcode function tribe_latest_upcoming_event_shortcode() { // Get the current date $current_date = date( 'Y-m-d H:i:s' ); // Query the... May 16, 2024 2 Asked a question WPML WordPress query for specific language onlyUse [apcode language="php"] 'suppress_filters' => false, [/apcode] and [apcode language="php"] $args['language'] = $language; [/apcode] in [apcode language="php"] get_posts($args);... May 13, 2024 2 Asked a question WordPress custom field in Media Gallery[apcode language="php"] //zodiac_name function zodiac_name_attachment_field_c2($form_fields, $post) { $zodiac_names = array( 'Aries', 'Taurus',... May 6, 2024 2 Asked a question WordPress insert posts from rss feed url[apcode language="php"] function c2_insert_posts_from_feed($atts) { // Default attributes $atts = shortcode_atts(array( 'rss_url' => 'Feed_URL', 'post_type'... April 24, 2024 2 Asked a question PHP redirect a url to file name without case sense[apcode language="php"] add_action('wp_head', 'custom_url_case_insensitive_redirect'); function custom_url_case_insensitive_redirect() { global $wp; $requested_url =... April 22, 2024 2 Load More