Using JQuery to check for Rel Attribute of Image before Overriding It

/*———————————————————————————–*/ /* Add rel=”lightbox” to image links if the lightbox is enabled */ /*———————————————————————————–*/ if ( jQuery( ‘body’ ).hasClass( ‘has-lightbox’ ) && ! jQuery( ‘body’ ).hasClass( ‘portfolio-component’ ) ) { jQuery( ‘a[href$=”.jpg”], a[href$=”.jpeg”], a[href$=”.gif”], a[href$=”.png”]’ ).each( function () { var imageTitle=””; if ( jQuery( this ).next().hasClass( ‘wp-caption-text’ ) ) { imageTitle = jQuery( this ).next().text(); … Read more

How to modify the paths of js from twentytwelve theme?

To disable comment-reply go to Discussion Settings and disable Threaded (nested) comments. Google-hosted jQuery: function my_scripts() { wp_dequeue_script(‘jquery’); wp_enqueue_script( ‘jquery’, // name ‘//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js’, // google hosted, protocol-independent array(), // dependencies (empty) NULL, // removes version true // load in footer, ‘false’ for header ); } add_action(‘wp_enqueue_scripts’, ‘my_scripts’);

Javascript in wordpress

Replace your above code with this following code : <?php /* Template Name: Meet The Team Template */ ?> <?php get_header(); ?> <div id=”meet_posts” class=”narrowcolumn”> <?php $recent = new WP_Query(“cat=6&orderby=title&order=ASC”); while($recent->have_posts()):$recent->the_post(); $desc_values = get_post_custom_values(“description”); ?> <div id=”meetteam_featured_image” class=”<?php the_ID(); ?> team_featured_image_<?php the_ID(); ?>”> <a href=”https://wordpress.stackexchange.com/questions/88772/<?php the_permalink() ?>” rel=”title”> <?php if ( has_post_thumbnail() ) { the_post_thumbnail(); … Read more

Ajax Validation for reCaptcha

Just found out that reCaptcha actually rejects CAPTCHAs which are submitted to their server more than once. Since I was using the WP-reCAPTCHA plugin, the plugin resubmitted the CAPTCHA after my AJAX submission. So I just commented out a line from the plugin that does the submission, which is in file recaptcha.php, line 27: $this->register_filters();