WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Last Viewed Posts] Make it work with localhost

[Plugin: Last Viewed Posts] Make it work with localhost

  • To make it work on localhost:

    We will need to add few lines in the function zg_lw_setcookie()

    Replace the below line :

    setcookie("WP-LastViewedPosts", serialize($zg_cookiearray), (time()+($zg_cookie_expire*86400)), $zg_path_url, $zg_blog_url_dot, 0);

    with:

    if($_SERVER['HTTP_HOST'] == 'localhost'):
    	setcookie("WP-LastViewedPosts", serialize($zg_cookiearray), false, "/", false, 0);
    	else:
    	setcookie("WP-LastViewedPosts", serialize($zg_cookiearray), (time()+($zg_cookie_expire*86400)), $zg_path_url, $zg_blog_url_dot, 0);
    	endif;

    http://wordpress.org/extend/plugins/last-viewed-posts/

  • The topic ‘[Plugin: Last Viewed Posts] Make it work with localhost’ is closed to new replies.
Skip to toolbar