- This topic has 19 replies, 2 voices, and was last updated 3 years, 11 months ago by
Fernando.
-
AuthorPosts
-
June 30, 2022 at 7:59 pm #2269806
Paul
Hello how are you
i have a issue here and pls guide and explain it, thanks in advance.
now i want to add other recommended articles from the same category at the end of each article, do you give me some ways to achieve this layout?
now im using post navigation from generatepress theme, pls check the screenshot https://prnt.sc/lVDm_vwNXjSR , The key issue is that it just show two articles and they are also from different post categories.
https://prnt.sc/DOcbdFTZ8Wt6
now what i want is1. Show more articles such as 5 articles
2. show the same articles from the same category
3. The articles displayed can be adjusted manually or automatically by time or other criteriaSo, if i just use the tools from generatepress theme, can it be done?
if not, what i should do or use what?
looking forward to hearing from u
thanks
June 30, 2022 at 8:04 pm #2269807Fernando Customer Support
Hi Paul,
I believe the functionality you’re looking for is the ability to query posts.
If so, an option is to use the Query Loop Block from GenerateBlocks free plugin.
See: https://generateblocks.com/generateblocks-1-5-dynamic-data-query-loops-image-blocks/
Also see: https://docs.generateblocks.com/article/query-loop-overview/
Through the Query Loop Block, you should be able to show articles, and choose which articles to show.
Hope this clarifies!
June 30, 2022 at 8:08 pm #2269809Paul
hello
thanks
i will try Query Loop Bloc
i remember that generatepress theme does not have this funciton?
anyway, how to know the update of theme funciton ?
otherwise the users will miss them
June 30, 2022 at 8:14 pm #2269811Paul
Hi Fernando,
I need to insert Query Loop Block at end of each article every time? Or i just insert it once?
June 30, 2022 at 8:29 pm #2269817Paul
Hi Fernando,
can i move the date to the right of heading titile and pls check the sreenshot https://prnt.sc/z_P4ea1GOmow
June 30, 2022 at 8:31 pm #2269819Fernando Customer Support
GeneratePress does not have this function. It was another product we had that has that function. Specifically, WP Show Posts.
Now, WP Show Posts has been merged with our other product, GenerateBlocks.
With regards to your second inquiry, you can add the Query Loop Block through a Block Element and hook it to somewhere like after_content and display it to all posts. This way, you wouldn’t need to add it to every article.
Hope this clarifies!
June 30, 2022 at 8:33 pm #2269821Fernando Customer Support
With regards to your third inquiry, can you try setting the Headline Blocks to inline width in the spacing section of their Block Settings.
Reference: https://docs.generateblocks.com/article/headline-overview/#spacing
Alternatively, you can place them in a Grid Block.
Reference: https://docs.generateblocks.com/article/grid-overview/
Kindly let us know how it goes.
June 30, 2022 at 8:36 pm #2269822Paul
So the i can not move the date to the right of heading title and now also can not use wp show posts plugin.
June 30, 2022 at 8:44 pm #2269824Fernando Customer Support
Try adding them within a Grid Block. Example: https://share.getcloudapp.com/5zurnDrn
You can still use WP Show Posts, it’s just that our team’s focus development-wise would be on GenerateBlocks.
Hope this clarifies!
June 30, 2022 at 9:04 pm #2269835Paul
hi
thans for ur help
i already used Query Loop Block and Element Block to add this to end of each article.
One more thing here, how to exclude itself own article from the recommended articles?
For exmaple: https://prnt.sc/S40721-zFRJ4
June 30, 2022 at 9:10 pm #2269836Fernando Customer Support
You can use a filter to do as such.
Add
my-class-nameto the Post Template Block as such: https://share.getcloudapp.com/qGuOrgnZThen add this PHP snippet:
add_filter( 'generateblocks_query_loop_args', function( $query_args, $attributes ) { if ( ! empty( $attributes['className'] ) && strpos( $attributes['className'], 'my-class-name' ) !== false ) { $query_args['post__not_in'] = [get_the_ID()]; } return $query_args; }, 10, 2 );Adding PHP reference: https://docs.generatepress.com/article/adding-php/#code-snippets
Hope this helps!
June 30, 2022 at 9:27 pm #2269842Paul
June 30, 2022 at 9:32 pm #2269844Fernando Customer Support
You can do so in Appearance > Customize > Site Identity.
Reference: https://docs.generatepress.com/article/site-identity-overview/
Hope this clarifies.
June 30, 2022 at 10:15 pm #2269872Paul
hello
yes, righti do that there
pls check the screenshot https://prnt.sc/tiVWfh7gHgH-
not show site title
where is the problem
June 30, 2022 at 10:23 pm #2269879Fernando Customer Support
It’s there, its color is white though that’s why it seems like it’s missing.
You can change the color of the Site Title in Appearance > Customize > Colors > Header > Site Title.
Hope this clarifies!
-
AuthorPosts
- You must be logged in to reply to this topic.