WordPress.org

Ready to get started?Download WordPress

Forums

WP Widget Cache
[resolved] Cache widgets with different content per page/category (2 posts)

  1. Vasya Pupkin
    Member
    Posted 3 years ago #

    I've installed WP Widget Cache, but there are no options to cache widgets with different content per page or per category.
    Can I solve this problem or I need to seek for another plugin?

    http://wordpress.org/extend/plugins/wp-widget-cache/

  2. Vasya Pupkin
    Member
    Posted 3 years ago #

    How to do caching of widgets with different content per page:
    Open widget-cache.php, then
    Find: "currentCategory"=>array(&$this,'get_current_category'),
    Add after: "currentPost"=>array(&$this,'get_current_post'),

    Find: function get_widget_cache_key($id)
    Add before:

    function get_current_post(){
      if(is_single()){
        global $post;
        return $post->ID;
      }
      return false;
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic