From 9571fbb5a98a9377363896d6a2ccf585b327b3b6 Mon Sep 17 00:00:00 2001 From: jorge-vitrubio Date: Sat, 28 Jan 2023 12:56:12 +0100 Subject: [PATCH] show 4 posts or ajuts in home, show 6 ajuts in search page --- page-templates/funds-search.php | 2 +- template-parts/section-featured.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/page-templates/funds-search.php b/page-templates/funds-search.php index 1f77d85..a9d89f7 100644 --- a/page-templates/funds-search.php +++ b/page-templates/funds-search.php @@ -58,7 +58,7 @@ get_header(); $the_query_ajut = new WP_Query( array( 'post_type' => 'ofisuport-ajut', - 'post_per_page' => '6' + 'posts_per_page' => '6' ) ); ?> diff --git a/template-parts/section-featured.php b/template-parts/section-featured.php index f83b8b3..201aeac 100644 --- a/template-parts/section-featured.php +++ b/template-parts/section-featured.php @@ -25,10 +25,10 @@ 'any', - 'post_per_page' => '4', + 'post_type' => array( 'post', 'ofisuport-ajut' ), + 'posts_per_page' => '4', 'meta_query' => array( array( 'key' => 'os_home_show', @@ -37,8 +37,8 @@ ) ) ); ?> - have_posts() ) : ?> - have_posts() ) : $the_query->the_post(); ?> + have_posts() ) : ?> + have_posts() ) : $featured_query->the_post(); ?>