Jagdish Sarma | Reputations

Asked a question
Wordpress disable Rest API for public

[apcode language="php"] add_filter( 'rest_endpoints', array( $this, 'block_rest_api_endpoints' ) );   add_filter( 'rest_authentication_errors', array( $this, 'block_rest_api_authentication_errors'...

5 days ago 2
Asked a question
ACF Open required field tab group

[apcode language="jscript"] jQuery(document).ready(function($) {     $('#publish').on('click', function(e) {         var invalidField = null;          // Loop through...

October 30, 2025 2
Asked a question
Rank math seo add og:logo

[apcode language="php"] add_filter( 'rank_math/head', function() { ?>     <meta property="og:logo" content="/wp-content/uploads/2021/05/logo.webp" /> <?php...

September 10, 2025 2
Asked a question
WP Download multple post details as PDF

Create a New JS file "js/bulk-pdf.js" and Add the functions in functions.php and in "pdf-template.php" add your html [apcode language="php"] //Bulk All PDF function enqueue_bulk_pdf_scripts() {     wp_enqueue_script(...

May 16, 2025 2
Asked a question
Download Multiple PDFs as ZIP via AJAX in WordPress

Create a JS and get the PDF links from Hidden Field [apcode language="jscript"] jQuery(document).ready(function($){     $('.download_all').on('click', function(e){         e.preventDefault();...

May 16, 2025 2
Asked a question
Woocommerce Facebook Pixel track

[apcode language="php"] add_filter('wpm_send_http_api_facebook_capi_requests_blocking', '__return_true'); add_action('wp_footer', function() {     if (is_page('thank-you-order')...

March 19, 2025 2
Asked a question
MC4WP: Mailchimp for WordPress Send data from Contact form 7 with Checkbox, Radio Buton Value

First change name of inputs to like this mc4wp-FIELDNAME and update checkbox names to send data to mailchimp [apcode language="php"] add_filter( 'mc4wp_integration_contact-form-7_data',...

March 12, 2025 2
Asked a question
Woocommerce Hide Free Shipping and Show based on conditions

✅ Hides usps_simple:GROUND_ADVANTAGE when product ID 2133 is in the cart.✅ Shows only free shipping when all products in the cart belong to shipping class 61.✅ Hides free shipping if there are mixed...

March 6, 2025 2
Asked a question
Mac Terminal rename all files inside a folder

Here renaming c2code to c2code_woo_email [apcode language="bash"] find . -type f -name "*c2code*.php" | while read file; do     newname="$(dirname "$file")/$(basename "$file"...

March 5, 2025 2
Asked a question
Woocommerce Single product lightbox disable

[apcode language="php"] add_action( 'after_setup_theme', 'c2_remove_zoom_lightbox_theme_support', 9999 ); function c2_remove_zoom_lightbox_theme_support() {     remove_theme_support(...

March 4, 2025 2
Asked a question
Woocommerce Sale Text Shortcode

[apcode language="php"] function custom_woocommerce_sale_text_shortcode($atts) {     $atts = shortcode_atts(         array('id' => ''),         $atts,         'sale_text'...

March 4, 2025 2
Asked a question
Woocommerce Show Hide Free Shipping based on Shipping Class

[apcode language="php"] add_filter( 'woocommerce_package_rates', 'c2code_hide_free_shipping_for_shipping_class', 9999, 2 ); function c2code_hide_free_shipping_for_shipping_class( $rates,...

March 4, 2025 2
Asked a question
WP Editor Add Body Class

[apcode language="php"] //Editor Add class function cms_custom_editor_body_class($mce_init) {     if (isset($mce_init['body_class'])) {         $mce_init['body_class'] .=...

March 3, 2025 2
Asked a question
Woocommerce Sort product by Price in separate page

[apcode language="php"] //Sort shop page function c2_query_by_post_meta( $query ) {  if (! is_admin() && $query->get( 'post_type' ) == 'product' && is_page('shop-now')...

February 27, 2025 2
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);...

February 21, 2025 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');...

February 19, 2025 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,...

February 19, 2025 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
Load More