• Hi All! I gotten myself spun out. I am trying to make a static page with text then the loop for a home page.
    I know how to go to setting and change “Front Page Displays: Latest Post or Static Page. I have created a page called -Home based on the standard template and was using this. Just want to add latest post after my intro stuff.

    I read the Loop docs but they only reference through 2.7 which may not be a big deal. As I remember from the one other template I made was to modify the index.php and save it as something like page_with_loop.php but where does it get saved to?

    I put it in the themes folder which is where my nosidebars.php template is. When I go to edit -Home and change the template in attributes the options are Default and NoSideBars.

    I’m missing something simple… thx for any help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • In my opinion, you should never rename index.php page. Duplicate it, and create page.php, single.php, as necessary. In case you don’t have those, the website will look for index.php.

    Those files are located in wordpress installation -> wp-content/themes/your_active_theme/

    I guess on your each template file you have on top:

    <?php
    /*
    Template Name: Unique_name
    */
    ?>

    Second, I never call my front page home.php, I name it home_page.php (or something similar) and than I serve it as front page from reading options.

    Thread Starter rforster

    (@rforster)

    Fast reply, thank you.

    I used filezilla to download the main index.php, renamed as page_with_Loop.php but hadn’t added those lines to the top. So I added those and uploaded to my current theme’s directory. I also serve it from reading options. Didn’t show posts on the front page.

    My “page” I am serving as Home is named “-Home” so it always sorts to the top of my page list.

    Thread Starter rforster

    (@rforster)

    I pulled down single.php, renamed page_with_Loop.php and uploaded. It worked but not really what I was looking for. Grabbed page.php and added the lines to the top, uploaded and edited -Home to use the templated but it didn’t show posts. Here’s that code:
    <?php
    /*
    Template Name: page_with_Loop
    */
    ?>
    <?php get_header(); ?>
    <div id=”content”>
    <div id=”contentleft”>
    <div class=”postarea”>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <h1><?php the_title(); ?></h1>
    <?php the_content(__(‘Read more’));?><div style=”clear:both;”></div><?php edit_post_link(‘(Edit)’, ”, ”); ?>
    <?php endwhile; else: ?>
    <p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p><?php endif; ?>
    </div>
    </div>

    Tomorrow I’ll try to find the loop that is called when reading option doesn’t use a page. Thx for your help.

    Thread Starter rforster

    (@rforster)

    Made it work but limited results.
    Here’s what show now on the front page and also my -Home page:
    -Home
    January 24, 2008 by Admin · 1 Comment
    Filed under: Uncategorized (Edit)
    This is the text from my -Home page…
    Tags:

    What i’m really after is to be able to write a page, maybe a couple of bullet points and paragraphs and THEN have the last 10 posts or whatever. I did make a post in Uncategorized but it doesn’t show up.

    Time for sleep.

    I assume that for home page, you asssign the new created template from the right menu..

    You do that from within home page view.

    Thread Starter rforster

    (@rforster)

    Yeah. I have another template I use that i connect to a database and my template has no side bars.

    Been doing a lot of reading and need to reform my question in a fresh post.

    Thanks for following up. 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Static Page with Loop’ is closed to new replies.