• I’m using the Custom Field Suite to create extra content blocks, and I can show them in the sidebar by using php inside the Enhanced Text Widget plugin. But now I want to hide other widgets when this custom field actually has content. So I need something like Widget Logic with PHP to hide specific widgets.

    I use this inside the Enhanced TextWidget:

    if (CFS()->get('eerste_blok') == '') {
    echo "...";
    } else {
    echo CFS()->get('eerste_blok');
    }

    But now I need something to put inside the Widget Logic field to show or hide that widget like this:

    if (CFS()->get(‘eerste_blok’) !== ”);

    but that didn’t work.

    https://wordpress.org/plugins/widget-logic/

  • The topic ‘Right PHP for use with Custom Fields Suit’ is closed to new replies.