I am setting up Wordpress site for a client with very limited options for her to edit. As a part of this customized and very limited setup, I have created front-page.php and I am hard-coding the navigation. Options-reading in the Wordpress admin will not be available to her. All is good, except I am lost on how to hard link to the list of posts? I have the Loop set up in index.php.
I know that there is echo get_permalink( get_option( 'page_for_posts' ) );
but the page for posts is not assigned and will not be assigned. When I try that now, the link takes me to the last post individual page.
Thank you for your input!
Clarification: I don't want to create an extra "page" just to display a list of posts. Is there a way to link to index.php, that displays a list of posts without having to create a "page"?
Clarification 2: It seems like a small thing to have an empty (to the client) Blog "page" that sits in the Admin with nothing visibly entered, but I am planning to do this install over and over for multiple clients with the same need, and this empty page should not be the part of the interface.
Contents of index.php
<?php
get_header();
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
the_post_thumbnail();
} // end while
} // end if
get_footer();
?>
index.php
, but you just need to link to it? In that case, you can usehome_url('/slug')
. If you want to create the link without hardcoding anything whatsoever, though, you will need it to be coming from a setting in admin.