MichiL
Forum Replies Created
-
This solution worked for me:
function custom_event_posts( $query ) { if ( ! is_admin() && $query->is_main_query() ) { if ( $query->is_home() ) { $query->set( 'post_type', array ('post', 'event') ); $query->set( 'posts_per_page', 10 ); } } } add_action( 'pre_get_posts', 'custom_event_posts' );
I added this code at the end of your functions.php of your theme
Thanks for your help!!Hi imranpixelite,
thanks again for your help, the solution you are talking about worked with a theme I used, several years ago, but not with the one I use now (Sydney). Do you have any other ideas?HI imranpixelite,
thank you for your fast reply.
The solution you discribed is perfectly for the content of single pages or articles.
But I want, that all events are listet in the main area of my blog.
If I released a new event it is also shown at the main are of my blog.
My Blog is configured to show the latest articles, not a static site.
I hope you know what I mean ??
Thank you!! ??thanks for your reply, is there a “automatic” solution? i would create a new event and the new event should also shown on the normal blogpage, sorry for my bad english, I hope you know what I mean
whith shortcodes its possible but with one more step for me to do ??