How to always display featured entries, regardless of search results

If you would like to always show featured entries, even if the current View search would exclude the entries from being shown, you can do so by  adding the following code:

/**
 * Allow override of default behavior, which is to respect search queries.
 *
 * @param boolean $always_show_featured_entry If returned true, featured entries will be shown even if the search doesn't match the entry
 */
add_filter('gravityview_featured_entries_always_show', '__return_true');

Read here how to add these code samples to your website: Where to put code samples.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us