WordPress.org

Ready to get started?Download WordPress

Plugin Directory

WP Live Preview Links

See a live scaled preview of the site you are linking to prior to clicking on it.

Other Notes

Adding live preview to WordPress search

Activate the plugin and in plugin settings select Live Preview Links = class="wp-live-preview"

This is how I've done it on my site running TwentyTwelve.

In the (child) theme folder, in functions.php, add the following

add_action( 'wp_enqueue_scripts', 'ps_live_preview_search_result', 11 );

function ps_live_preview_search_result () {
    wp_enqueue_script( 'ps_live_preview_search_result_script', get_stylesheet_directory_uri() .  '/ps_live_preview_search_result.js', array('wp-live-preview-links'), false, true );
}

Copy ps_live_preview_search_result.js to the (child) theme folder:

(function($) {
    $('.search-results .entry-title a').each(function(index){
        $(this).addClass('wp-live-preview');
    });
    $(window).resize();
})(jQuery);

Credits

Requires: 3.7 or higher
Compatible up to: 3.9.2
Last Updated: 2014-5-5
Downloads: 895

Ratings

5 stars
5 out of 5 stars

Support

0 of 1 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1