Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi there,

    I haven’t tested this modification, but I believe it should work:

    1. Go to Plugins > Editor and pick WordPress Popular Posts from the dropdown at the right.
    2. Find:
      // * categories
      if ( !empty($instance['cat']) && $join_cats ) {
      	// ... rest of the code here

      … and replace it with:

      if ( empty($instance['cat']) ) {
      	global $your_global_category_variable_here;
      
      	if ( is_numeric($your_global_category_variable_here) )
      		$instance['cat'] = $your_global_category_variable_here;
      }
      
      // * categories
      if ( !empty($instance['cat']) && $join_cats ) {
      	// ... rest of the code here
    3. Hit the Update file button to save changes.

    Note that any modifications made to plugin’s code will be lost the next time WPP gets an upgrade.

    Thread Starter luisalonsobr

    (@luisalonsobr)

    Thank You, will test and let you know!

    Thread Starter luisalonsobr

    (@luisalonsobr)

    Worked like a charm. Thank you for your time and your plugin!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Current Category’ is closed to new replies.