• Resolved jrcollins

    (@jrcollins)


    I’m using Widget Logic to stop a widget showing on parent category pages:

    $thiscat = get_category( get_query_var( 'cat' ) );
    $parent = $thiscat->category_parent;
    return
    !(is_category( ) && empty ($parent) );

    I now want to add !is_front_page() to stop the widget from showing on the front page as well.
    I tried and failed using the following code:

    $thiscat = get_category( get_query_var( 'cat' ) );
    $parent = $thiscat->category_parent;
    return
    (!is_front_page( ) || !(is_category( ) && empty ($parent) ) );
Viewing 1 replies (of 1 total)
  • Thread Starter jrcollins

    (@jrcollins)

    Ok, I think I’ve got it now:

    $thiscat = get_category( get_query_var( 'cat' ) );
    $parent = $thiscat->category_parent;
    return
    !(is_front_page( ) || (is_category( ) && empty ($parent) ) );
Viewing 1 replies (of 1 total)

The topic ‘Need help modifying code’ is closed to new replies.