Remove Sorry, no content matched your criteria in Genesis

There’s at least 3 ways to remove the “Sorry, no content matched your criteria text” displayed when no posts exist for your query.

1. Add this line of PHP code in your page template or functions file.

remove_action( 'genesis_loop_else', 'genesis_do_noposts' );

2. If you’re modifying the Infinity Pro child theme by StudioPress which includes a custom loop, you can also remove the no posts text by adding the hook to the existing hooks in the page_team.php template file on line 62 like this :

$hooks = array(
    'genesis_loop_else'
);

3. Another way to remove or modify the no posts text is to use the genesis_noposts_text filter hook.

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.