Two loops on archive page

From your question it is not clear which posts you want to select precisely. In any case, you clearly want to display different posts than are normally presented on the archive page. This means you will need to make a different selection in your template, using wp_query. The trick is to select the right arguments. … Read more

Displaying Custom Posts on a Page

You can find information about the loop here and here, inside the loop the post object is available, you can get the post data there, this includes the content, the title etc. Example: <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php //stuff here the_title(); the_time(); the_content(); ?> <?php endwhile; wp_reset_query(); ?>

Output loop leveraged shortcode twice on one page

Not sure I understand what you are doing with your shortcode, but I think you need to run rewind_posts() to move the loop counter back to the beginning for the second “execution.” Example here: https://codex.wordpress.org/Function_Reference/rewind_posts further explanation here: https://stackoverflow.com/questions/23729847/wordpress-difference-between-rewind-posts-wp-reset-postdata-and-wp-reset-q

Detect if current page is front page within custom query

Marius, I have been in this situation before as well. Haven’t found a good solution though. Answer provided by Laxmana won’t work as the $isFrontPageOrSearch wont be accessible inside the template-part file. Although using the approach provided by Laxmana, you could be using PHP include(locate_template(‘your-template-name.php’));, instead of using get_template_part function. Then the variable would be … Read more