Support » Plugins » quick widget logic help

  • I’m trying to do both categories and pages with one widget and I can’t seem to get it to work.

    I’m trying

    is_category(’18’) && is_page(array(314,316,310,312,235,301,299,243,240,238,308,305))

    but I cannot get it to work

Viewing 1 replies (of 1 total)
  • && stands for AND – being a category archive or a static page is mutually exclusive – therefore your condition will never be true;

    try to use || which stands for OR

    is_category('18') || is_page(array(314,316,310,312,235,301,299,243,240,238,308,305))

    this means:
    ‘if it is category archive of cat 18 OR any of the pages in the list’

Viewing 1 replies (of 1 total)
  • The topic ‘quick widget logic help’ is closed to new replies.