Archived topic
Elements in Columns
3 replies · Started by Rob on October 22, 2020
I am looking to see if there is a way to use GeneratePress and WP Show Posts to recreate something that I have in place on an existing website.
I have attached a couple of example pages from a website that I have worked on that highlights the issue. On the example pages you will see that the main content area is divided into 2 columns using the block editor. The left column has a dynamically pulled in latest news post (with the blue background) and the right hand column has a dynamically pulled in a testimonial. This has been done by creating a block(by adding code to functions.php) that when placed into a page allows me to select the category that I want the latest news post (or testimonial) to be pulled from.
Is this something that could be replicated without coding a block at all? I was thinking of WP Show Posts but would that mean I have to create multiple Show Posts and select the correct one or is there a way to add dynamism to this to allow me to select the relevant category at block level?
Hi there,
WP Show Posts can only filter its output based on the plugin settings or standard post query args.
For example - Tom provides a short code that filters a list based on the posts current category:
https://wpshowposts.com/support/topic/show-related-posts-exclude-post/#post-18750
But doing this at a block level is not possible.
Thanks - I did think that may be the case.
That link was helpful anyway - I didn't know that could be done so all good.
Glad to be of ( some ) help!