helpful_conditions

Filter the conditions and check if you are on the homepage and not in the single view. The example shows how you can show Helpful on the start page.

/**
 * @param array $conditions
 * @return array
 */
add_filter('helpful_conditions', function (array $conditions) {
    $key = array_search('is_front_page', $conditions);

    if (false !== $key) {
        unset($conditions[$key]);
    }

    return $conditions;
});

Was this post helpful?

Top