Hi
In single.html (php) I show one post.
This is the default wp_query loop for such a page.
In this page I also want to show another loop that shows me for example all featured images from the posts. The Loop « WordPress Codex describes how to make php multiple loops.
Does Pinegrow have some sort of Smart Actions to encomplish this too?
Or should I make PHP blocks (in pinegrow editor)
If I look at an example from the mentioned codex page:
> // going off on my own here
<?php $temp_query = $wp_query; ?>
<!-- Do stuff... -->
<?php query_posts( 'category_name=special_cat&posts_per_page=10' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<!-- Do special_cat stuff... -->
<?php endwhile; ?>
// now back to our regularly scheduled programming
<?php $wp_query = $temp_query; ?>
Then maybe I need to put that in PHP smart action blocks and work from there.
Another solution will be to edit manually the created php file from PG and edit the code in. But this would spoil the usage from PG Editor
/ Hans
To add better styling you’ll need to do a bit more work to get the images where you want them, but hopefully this makes sense.
If you need more help let me know.
Bob
Hi @RobM ,
many thanks for this, I never realized PG can have custom wp_query’s beside the global wp_query.
and also lots of options in this Wordpress action, just the thing I needed and didn’t find before.
Greetings!!
p.s. and yes it works!