Home/Index to just static - Don't loop or load page

Is there an option to disable/delete the following code in the index.php of a wordpress-theme?

  • The trinary operator (including both conditions)
  • The respective endwhile and endif
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

	...not a global bloc... <-- CONTENT

<?php endwhile; ?>
<?php endif; ?>

As like commenting them out.


I just want to use the start page (Home aka index.php) of the theme for a static template with some WordPress loops I’ve defined.

Set start/homepage to a topic just loads the page.php and doesn’t select anything or select recent posts, just loops thanks to these line through the multiple recent posts, means the content-part of my Home Template gets repeated.

I understand how I could make use of the lines I don’t want to use, but that wouldn’t fit my idea.
And commenting these lines manual out after each export would be a hassle.