Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter summatix

    (@summatix)

    In restrict-widgets.php I added the following code after line 1611:

    foreach(get_the_category() as $category)
    {
    	$found_main = isset($instance['rw_opt']['category_'.$category->cat_ID]) ? true : false;
    	if ($found_main) break;
    }

    This achieves the functionality I desire. Have I misinterpreted the intention of setting a category restriction? It appears it’s designed to show only on particular category archives, rather than on posts within a particular category.

    Thread Starter summatix

    (@summatix)

    Note: the above needs to be enclosed in if ($found_main == false)

    Plugin Author dFactory

    (@dfactory)

    Yes, exactly.

    For that kind (or any other) of restriction just use the rw_display_widget filter hook. It returns a boolean of wheather to disply widget or not.

    Thread Starter summatix

    (@summatix)

    I don’t like that direction because it’s not intuitive. I’d rather this change be added directly to the plugin itself. Otherwise I’ll just fork it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display by category not working’ is closed to new replies.