• Hello there!
    You’re plugin is great, got it working within a minute.
    Of course we want the best and fastest results so I’m experimenting a bit.

    This is the site I’m currently working on:
    https://46.17.2.22/~acdb/

    My question:
    I’m using the Picturefill method, and all images are shown perfectly.
    But when I request an ajax call, with images, there is no “retina” info in the html.
    Ajax returns clean html and works basically the same as a normal loop. Is there something I need to add somewhere?

    Hoping for a solution ??

    Jonas

    https://www.ads-software.com/plugins/wp-retina-2x/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi Jonas! ??

    Closed the other topic, it might not be exactly your issue.

    What do you mean by “when I request an ajax call”? Where? What is this ajax call doing?

    Thread Starter JonasVorwerk

    (@jonasvorwerk)

    Hey Jordy,
    Great to hear from you.

    It’s a straight forward ajax call with in functions.php:
    //load posts
    add_action(‘wp_ajax_loadPosts’, ‘loadPosts’);
    add_action(‘wp_ajax_nopriv_loadPosts’, ‘loadPosts’);
    function loadPosts(){
    $args = array(
    ‘posts_per_page’ => -1,
    ‘post_type’ => ‘portfolio’,
    ‘post_status’ => ‘publish’,
    ‘category_name’ => $_POST[‘category’]
    );

    $the_query = new WP_Query( $args );
    if ( $the_query->have_posts() ) {
    while ( $the_query->have_posts() ) {
    $the_query->the_post();
    get_template_part(‘loop-post’);
    }
    }
    wp_reset_postdata();
    }

    It returns just a basic loop: loop-post.php

    <div postid=”<?php the_ID(); ?>”>
    <div class=”post-title”><?php the_title(); ?></div>
    <div class=”post-permalink”><?php the_permalink(); ?></div>
    <?php if ( has_post_thumbnail() ) { the_post_thumbnail(‘thumbnail’); } ?>
    </div>

    But the thing is that the the_post_thumbnail() function returns the “normal” html and not the stuff that is required for Picturefill.

    Hope to hear from you!
    ps: if this is covered I back you up with the pro version ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Picturefill and ajax?’ is closed to new replies.