• Resolved CovertOpsKawliga

    (@covertopskawliga)


    If my first page (index.php) is just an intro page with a slideshow, what is the best way to show my post’s loop on another page??

    Can I create a ‘posts.php’ page that shows all of the posts, if so, what is the best way to link to that page??

    Or is it best if I use the ‘Add Page’ function in the admin panel and then insert my loop function there?

    Personally I would like to create a ‘posts.php’ page, I just don’t know the best way to do it.

    Any help would be really appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • It depends a little on your theme, but I think what you want is to create a new blank page (title it ‘My Blog’, for example).

    Then, go to Admin->Settings->Reading and assign your intro page as a Static Front Page, and your ‘My Blog’ page as the Blog page.

    Thread Starter CovertOpsKawliga

    (@covertopskawliga)

    what do you do with the index.php page?

    sorry for the noobery

    Thread Starter CovertOpsKawliga

    (@covertopskawliga)

    the add pages thing isnt working for me.

    is it possible to add pages another way?? a cleaner way??

    im currently looking into add_option / get_option functions. am i going in the right direction??

    Thread Starter CovertOpsKawliga

    (@covertopskawliga)

    ok, ive tried everything and i just dont understand.

    my index.php file displays an intro slideshow and then the 5 latest featured posts (this is done by creating a custom meta field whereby it tells whether the post is regular or featured).

    i would like another page to display all of the posts. ive tried using templates (changing my intro page to home.php and my posts page to projects.php – and then creating the pages for both).

    but all this does is show my home.php on every page.

    is there another way to add pages so that i can display custom loops on each??

    Thread Starter CovertOpsKawliga

    (@covertopskawliga)

    i figured it out! for my home.php:

    <?php
    $args = array (
    	       'meta_key'   => '_project_type',
    	       'meta_value' => 'Featured',
    	       'showposts'  => '5'
    	       );
    
    query_posts($args);
    ?>
    
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    and for my projects.php:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    
    $args = array (
    	       'paged'      => $paged,
    	       'posts_per_page'   => '15'
    	       );
    
    query_posts($args);
    ?>
    
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    just do what vtxyzzy said but instead of checking the static box, just use the dropdowns and it should work

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Best Practice for adding pages’ is closed to new replies.