diff --git a/src/functions.php b/src/functions.php index fb9ac05..549e592 100644 --- a/src/functions.php +++ b/src/functions.php @@ -192,7 +192,7 @@ add_action( 'admin_head', 'tainacan_customize_editor_css'); */ function tainacan_include_items_in_search_results( $query ) { - if ( $query->get( 'post_type' ) !== 'tainacan-collection' && !$_GET['onlyposts'] && !$_GET['onlypages'] && $query->is_main_query() && $query->is_search() && ! is_admin()) { + if ( defined ('TAINACAN_VERSION') && $query->get( 'post_type' ) !== 'tainacan-collection' && !$_GET['onlyposts'] && !$_GET['onlypages'] && $query->is_main_query() && $query->is_search() && ! is_admin()) { $collections_post_types = \Tainacan\Repositories\Repository::get_collections_db_identifiers(); $existing_post_types = $query->get( 'post_type' ); diff --git a/src/template-parts/list-post.php b/src/template-parts/list-post.php index 2caaaea..47bf5d3 100644 --- a/src/template-parts/list-post.php +++ b/src/template-parts/list-post.php @@ -1,5 +1,5 @@ labels->singular_name; @@ -15,7 +15,7 @@