• Hello, excuse the n00b-ness of this but for some reason I can’t figure it out!

    I’m using Starkers and want to put all blog posts on a custom page called “Blog”. The posts are present in the backend, but when I run the loop on the custom page nothing happens. Here’s the code I’m using (I copied it from the index.php that came with the theme):

    <?php
    /*
    Template Name: Blog
    */
    ?>
    
    <?php get_header(); ?>
    
    <div id="main">
    <h1>Blog</h1>
    
    	<?php
    	/* Run the loop to output the posts.
    	 * If you want to overload this in a child theme then include a file
    	 * called loop-index.php and that will be used instead.
    	 */
    	get_template_part( 'loop', 'index' );
    	?>
    
    </div>
    <?php get_footer(); ?>

    [Moderator Note: Please post code or markup snippets between backticks or use the code button.]

    I’ve tried changing the Reading settings in the dashboard but that doesn’t seem to have any effect. I don’t know what I’m doing wrong. Any insight? All help appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m not really sure what you mean, but this might help you:

    https://codex.www.ads-software.com/Category_Templates

    Thread Starter Badda Bing

    (@disastrid)

    What I mean is that I want all the blog posts to appear not on the front page, but on a custom page called “Blog”. Since I want to display all posts from all categories, I’m not sure a category template will help.

    I’ve tried changing the Reading settings in the dashboard

    So you now have a static front page and a main posts page called Blog, yes?

    Ok, what you can do is the following:

    Go to settings > reading, select the option to use a static page as the frontpage of your blog.

    Create a category containing all blog posts. Create a link to this category in your menu. If users click that link, all posts should show up.

    Thread Starter Badda Bing

    (@disastrid)

    Thanks so much esmi and Arjen, I was being silly! I had the static/front pages mixed up. Thanks for getting me back on the right track! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Need to display posts on a custom page – Starkers’ is closed to new replies.