• It looks like $conditions in popup-functions.php is testing for the wrong array keys.

    Tests like

    elseif( array_key_exists('on_specific_categories', $conditions) && array_key_exists('on_category_' . $category_id, $conditions) )

    will always return false, because the actual $conditions array looks like this:

    Array\n(\n [on_categorys] => true\n [on_specific_categorys] => true\n [on_category_161] => 1\n [on_search] => true\n)\n

    As result, popups never show on specified target categories.

    https://wordpress.org/plugins/popup-maker/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    @viniciusrtf – I’m not sure I understand what your example is trying to show.

    Assuming an array of

    array(
      'on_categories' => true,
      'on_specific_categories' => true,
      'on_category_161' => 1,
    );

    Then both on_specific_categories and on_category_161 keys exist returning true.

    Their values don’t matter.

    v1.3 is gonna attempt to rewrite this entire section of code to make it more performance friendly with many popups, as well as taking up less storage and post meta rows.

    If its not loading on a specific category page for you then it may be another issue.

    If we verify this is an issue either way we need to move it to the public github issue tracker for further discussion so that it can be resolved.

    https://github.com/PopupMaker/Popup-Maker/issues

    Plugin Author Daniel Iser

    (@danieliser)

    Ahh I see what your saying, but that shouldn’t be how they are stored. They should be stored as on_specific_categories and on_category_#, are you seeing something different?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Not working for specific categories’ is closed to new replies.