Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter seeekr

    (@seeekr)

    Hey JP,

    thanks, appreciated!

    – Denis

    Thread Starter seeekr

    (@seeekr)

    Hey JP,

    it is self-programmed, though not by me personally:

    public function widget( $args, $instance ) {
            echo $args['before_widget'];
            $qargs = array(
                    'posts_per_page' => 3,
                    'post_type' => 'testimonial'
                );
                $ttm_query = new WP_Query( $qargs );
                if ( $ttm_query->have_posts() ) : ?>
                <div id="testimonials_wrapper">
                    <?php while ( $ttm_query->have_posts() ) : $ttm_query->the_post(); ?>
                        <div class="testimonial_item row">
                          <div class="medium-4 column">
                            <?php the_post_thumbnail('thumbnail'); ?>
                          </div>
                          <div class="medium-7 column">
                            <h3><?php the_title(); ?></h3>
                            <div class="entry"><?php the_content(); ?></div>
                          </div>
                        </div>
                    <?php endwhile; ?>
                </div>
                <?php wp_reset_postdata(); endif; ?>
            <?php echo $args['after_widget'];
        }

    Does that answer your question? Let me know if I can provide any further assistance 🙂

    – Denis

    Hey @jkrill,

    I’m working with @physalis on that project and I’ve created a patch for your plugin that solves the performance issue for sites with lots and lots of content.

    The gist is that I load the html contents via ajax after the page itself has loaded, and cache them in the browser’s localStorage, plus adding an additional entry at the bottom of the select menu options list that allows for clearing the cache / reloading the contents.

    That completely solves the performance issues for us.

    If you’re interested in merging such a change, let me know where I can reach you to send a patch (or PR if you’re working with GH or something similar).

    Cheers,
    Denis

Viewing 3 replies - 1 through 3 (of 3 total)