ACF link withing website is good, but not external link?

That will happen if the link doesn’t include http:// in it. For example, if the user has entered just linkedin.com into the field. In that case <a href=”https://wordpress.stackexchange.com/questions/284064/linkedin.com”> will be treated as a relative link by the browser. Use esc_url on output to ensure a full valid URL with protocol is output: <?php echo esc_url( … Read more

Change WooCommerce Checkout Manager Datepicker to Jalali

By looking at the plugin code, you have different options: Date picker language is being selected based on the following code. $current_language = ( defined( ‘ICL_LANGUAGE_CODE’ ) ? ICL_LANGUAGE_CODE : apply_filters( ‘wooccm_language_code’, false ) ); // DatePicker wp_enqueue_script( ‘jquery-ui-datepicker’, array( ‘jquery’ ) ); if( defined( ‘ICL_LANGUAGE_CODE’ ) || !empty( $current_language ) ) { // Check … Read more

How do I use (or mimic) document.getElementById() on a page loaded from WordPress database?

WordPress uses wp_enqueue_script() to register and enqueue javascript contained in a separate file. The default behavior is for wp_enqueue_script() is to load the script before the </body> tag, and apparently WordPress pages require the script to be loaded in the footer. As pointed out in the comments, the clue to this problem with the loading … Read more

Load Meta box value into div AJAX [duplicate]

Add data attribute data-post-id for the post id. Eg. HTML: <ul> <li><button class=”play_next” data-meta-key=”url-1″ data-post-id=”<?php the_ID(); ?>”>Video 1</button></li> … </ul> Missing data attributes in js. $( this ).data( ‘metaKey’ ); should be $( this ).data( ‘meta-key’ ); and $( this ).data( ‘post_id’ ); should be $( this ).data( ‘post-id’ ); E.g. Jquery: jQuery( document ).ready( … Read more

Show / hide DIV with jQuery – doesn’t work in one page

Okey, I found a solution… Problem was because of on AJAX loaded content My code works if I use this: jQuery(document).ajaxComplete(function($){ jQuery(document).ready(function($){ $(“.more-info”).click(function(){ $(this).closest(‘.resume_list’).find(‘.main-box-info’).slideToggle(); $(this).closest(‘.more-info’).find(‘span.click-show-notes, span.click-hide-notes’).toggle(); }); }); })

Unable to understand this jquery code [closed]

Your specific questions: var featureIconHolder = $(“.feature-icon-holder”, “#features-links-holder”); Here’s the documentation link for this: http://api.jquery.com/jQuery/#jQuery1 The two arguments here are selector and context. What this does is find all elements of class feature-icon-holder that are descendents of the element with ID features-links-holder. This constructs an array-like object that contains 0+ elements depending on how many … Read more

ACF repeater image in video poster with jquery

After thinking a lot, I have solved it myself in the following way: if (document.documentElement.clientWidth < 900) { $(‘video’).each(function () { const poster = $(this).data(‘poster’); $(this).attr(‘poster’, poster); }); } Thanks to everyone