- This topic has 9 replies, 3 voices, and was last updated 3 years, 3 months ago by
Fernando.
-
AuthorPosts
-
December 20, 2022 at 1:41 pm #2468674
Myles
Hi, I’ve read the overview on how Query Posts work, and understand the basic operation.
However, how do I tell a Query Post block
- what type
of posts to populate within the block?
For example, I’m using a GP theme that have a Query Posts block on the home page featured just Featured Articles, then another Query Posts block beneath that showing Latest Articles.
I tried looking at each block’s setting to determine what the difference is and how one is pulling featured articles while another is pulling recent posts, but. I could not see a difference.
Can you please advise? Thanks!
December 20, 2022 at 1:52 pm #2468693Ying
StaffCustomer SupportHi Myles,
Can you link us to your homepage?
December 20, 2022 at 1:55 pm #2468695December 20, 2022 at 1:59 pm #2468697Ying
StaffCustomer SupportI’m not seeing the site link.
December 20, 2022 at 2:01 pm #2468699Myles
That’s weird…Let’s try again 🙂
December 20, 2022 at 2:13 pm #2468705Ying
StaffCustomer SupportThe 1st query loop is not presenting the featured image, it’s just the latest 3 posts.
The 2nd query loop is also presenting the latest posts, but offsetting the latest 3 posts which are already presented in the 1st query loop block.
December 20, 2022 at 2:26 pm #2468712Myles
Thanks, Ying! That makes sense.
That brings up the question, how can I use Query Post blocks to show, perhaps only manually selected posts for a blog?
And secondly, how can I use Query Post blocks to show only posts that belong to a specific primary category?
December 20, 2022 at 5:28 pm #2468813Fernando Customer Support
Hi Myles,
To choose which posts to show in a GB Query Loop Block, you can set parameters in the Block settings. Reference: https://docs.generateblocks.com/article/query-loop-overview/#query-parameters
For instance, if you have a Featured Posts section, you can tag posts as featured. Then, add the parameter to include only posts from Taxonomies – Tags – featured. Example: https://share.getcloudapp.com/jkuOe0xd
You can also choose specific posts, and posts from specific categories through the Parameters option.
For specific posts, choose the parameter “Include posts”.
For posts of a specific category, choose Taxonomies – Categories.
December 20, 2022 at 10:20 pm #2468938Myles
Awesome, thanks!
December 20, 2022 at 11:15 pm #2468967Fernando Customer Support
You’re welcome, Myles!
-
AuthorPosts
- You must be logged in to reply to this topic.