Jagdish Sarma | Reputations

Asked a question
WPML WordPress query for specific language only

Use [apcode language="php"] 'suppress_filters' => false, [/apcode] and [apcode language="php"] $args['language'] = $language; [/apcode] in [apcode language="php"] get_posts($args);...

2 hours ago 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
Asked a question
Woocommerce add Custom url for Out of Stock Product

Create a custom field for dynamic url Or use a static url using commented line [apcode language="php"] add_filter( 'woocommerce_product_add_to_cart_url', 'out_of_stock_read_more_url',...

April 16, 2024 2
Asked a question
Facebook track custom events on click

[apcode language="jscript"] jQuery(document).on('click', '.get_a_quote', function() {  fbq('trackCustom', 'GetAQuote'); }); [/apcode] GetAQuote can be change to...

April 10, 2024 2
Asked a question
All in ONE SEO limit title, meta description

To limit title  [apcode language="php"] add_filter( 'aioseo_title', 'aioseo_filter_title_len' ); function aioseo_filter_title_len( $title ) {    if ( strlen($title) > 60 ) {...

March 27, 2024 2
Asked a question
WordPress create a serch form to search in current page

First create search form shortcode [apcode language="php"] add_shortcode( 'agent_search', 'dtwd_special_agent_search' ); function dtwd_special_agent_search( $atts ) {  ob_start();?>...

March 22, 2024 2
Asked a question
Wordpress replace a tag with span if href and text same

[apcode language="php"] function theme_slug_filter_the_content( $content ) {      $content = preg_replace_callback(         '/<a\s+href="([^"]+)"[^>]*>([^<]+)<\/a>/i',...

March 14, 2024 2
Asked a question
Wordpress add lightbox to any images with or without Builder

[apcode language="php"] function add_prettyphoto_attributes_to_images($content) {     // Add 'prettyphoto' class  $pattern = '/<img\s+[^>]*src=(["\'])(.*?)\1[^>]*>/i';...

March 6, 2024 2
Asked a question
WordPress remove rel=" noreferrer noopener nofollow" from link

[apcode language="php"] function theme_slug_filter_the_content( $content ) {  // Define the attribute you want to remove $attribute = 'rel';  // Regular expression pattern to match and remove...

March 2, 2024 2
Asked a question
WP Create a Shortcode to view and load more posts using Ajax

[apcode language="php"] //Shortcode Created add_shortcode( 'post_view', 'dtwd_special_collection_view' ); function dtwd_special_collection_view( $atts ) {     $atts = shortcode_atts(...

February 29, 2024 2
Asked a question
Wordpress get post id by Title

[apcode language="php"] function c2_get_post_id_by_title( string $title = '' ): int {     $posts = get_posts(         array(             'post_type'...

February 29, 2024 2
Asked a question
Combine multiple csv file using CMD

First create a folder and insert the csv which needs to merge Right click on folder and copy folder path Next open CMD and type [apcode language="bash"] cd "FOLDER PATH PASTE" [/apcode]...

February 13, 2024 2
Asked a question
jQuery Javascript download table as CSV

[apcode language="jscript"] function convertTableToCSV(table) {     // Get the table header row.     var headerRow = jQuery(table).find('tr:first');      // Create a CSV string....

February 12, 2024 2
Asked a question
HubSpot show form in popup

[apcode language="jscript"] jQuery('.enquire-btn').on('click', function() {     hbspt.forms.create({     portalId: "xxxxxx",  formId: "xxxxx-xxx-xxxxxxx",...

February 6, 2024 2
Asked a question
GravityForm Populate Checbox with Category name

[apcode language="php"] add_filter( 'gform_pre_render_3', 'populate_checkbox_vendor' ); add_filter( 'gform_pre_validation_3', 'populate_checkbox_vendor' ); add_filter(...

January 18, 2024 2
Asked a question
WordPress Shortcode with Custom CPT & ACF

[apcode language="php"] add_shortcode( 'collection_view', 'dtwd_special_collection_view' ); function dtwd_special_collection_view( $atts ) {     $atts = shortcode_atts(        array(...

January 18, 2024 2
Asked a question
Gravity form auto populate checkbox from custom post type

[apcode language="php"] add_filter( 'gform_pre_render_1', 'populate_checkbox' ); add_filter( 'gform_pre_validation_1', 'populate_checkbox' ); add_filter( 'gform_pre_submission_filter_1',...

January 8, 2024 2
Asked a question
How To Add A Back To Top Link Using Elementor

Add the HTML in Footer Section or You can add using Elementor Custom Code Option [apcode language="xml"] <a title="Scroll back to top" rel="nofollow" href="javascript:void(0);"...

December 15, 2023 2
Load More