Gravity Forms not loading under https, jQuery is not defined
Pretty sure it’s because the official jQuery CDN doesn’t support HTTPS – use Microsoft’s or Google’s instead.
Pretty sure it’s because the official jQuery CDN doesn’t support HTTPS – use Microsoft’s or Google’s instead.
Okay. Got it working…. I used the simple version: add_filter( ‘admin_post_thumbnail_html’, ‘basic_add_opacity_to_feature_thumb_box’); //same as before function basic_add_opacity_to_feature_thumb_box( $myhtml ) { $selected_option = get_post_meta( get_the_ID(), ‘basic_opacity’, true ); // get the current value for ( $i = 0; $i <= 1; $i = $i + 0.1 ) { //loop from 0 to 1 in 0.1 increments … Read more
Here are few ideas: It’s possible to inject custom HTML or data attributes via the comment_reply_link filter, but I think it would be better to keep it unobtrusive. One could try to get the comment parent value from the reply comment form: <input type=”hidden” name=”comment_parent” id=’comment_parent’ value=”0″ /> after it has been updated with the … Read more
WordPress loads jQuery because plugins and themes suppose it does. If you want another version of jQuery for your theme, there is a risk that plugins you may be using will not work, since (if they are maintained well) they are designed to work with default jquery. That said, if you insist on using your … Read more
This whole thing works as far as I can tell. In the future it may be easier to debug things by using PHP error_log() to write to the debug.log at certain points, like inside your ajax callback. If you’re only wanting to run this ajax for logged in users, you can drop the wp_ajax_nopriv hook … Read more
To use a custom control, you need a field with special attributes to be linked to the “publish” button. if you don’t want to display this field, you can generate a hidden field like that : class WP_Test_2_Customize_Control extends WP_Customize_Control { public function render_content() { ?> <input id=”<?php echo htmlspecialchars(“_customize-input-{$this->id}”);?>” type=”hidden” <?php $this->input_attrs();?> <?php if … Read more
Tried very simple math. <div class=”slide”> will print after every 4 post. So, if statement with old school logic $i%4 == 0 <div class=”slides_container”> <?php $args = array( ‘post_type’ => ‘fastighet’, ‘numberposts’ => -1, ‘orderby’ => ‘ASC’ ); $posts = get_posts($args); ?> <?php $i = 0; foreach($posts as $post): ?> <?php if($i%4 == 0): ?> … Read more
You’re enqueuing a specific version of jQuery. It’s better to enqueue the version that comes with WP, like this: wp_enqueue_script(‘jquery’); in a function run by the hook wp_enqueue_scripts
@kennypu in stackoverflow saved my life with this: t’s because you’re changing the contents of #paginar, so what happens is the event on the links are getting cleared. depending on your jquery version, you can either use .live() or add the even to the #pagi-container instead: $(‘#pagi-container’).on(‘click’,’#paginar > a’,function() {… } my finished code is … Read more
Per the jQuery noConflict Wrappers section of the wp_enqueue_script() Codex page, the $ variable is not available in WordPress. You can replace $ with jQuery in your jQuery code, or do something like this: jQuery(document).ready(function($) { // your code here . . . });