WordPress.org

Ready to get started?Download WordPress

Forums

Looking to offer alternative "front page" (9 posts)

  1. cleck673
    Member
    Posted 4 years ago #

    I went from a standard blog style front page to a magazine style front page. I want to be able to offer my readers a way to view all content in a blog style format if they choose to. The solution doesn't have to be fancy either. It would be great if there was a way to use a cookie to remember their preference, but I am sure that is more involved than I want to deal with right now.

    Any suggestions?

    Thanks!

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    How would you define a blog style format? A list of posts sorted by date? Only that's a standard archive page.

  3. cleck673
    Member
    Posted 4 years ago #

    Instead of what I have where i provide a thumbnail and the excerpt now, I want an alternate that shows the full post (or wherever the <more> is inserted) like most typical blogs show.

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    That's do-able but it does depends what you're using as your front page. Is that also a page of posts or is it a static front page?

  5. cleck673
    Member
    Posted 4 years ago #

    its a page of posts, it's a magazine style format. It's not static.

  6. esmi
    Forum Moderator
    Posted 4 years ago #

    Bare bones custom page template but you should be able to adapt this to work in your theme:

    <?php
    /*
    Template Name: Back Issues
    */
    ?>
    <?php get_header(); ?>
    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args= array(
    	'caller_get_posts' => 1, // don't show sticky posts at the top
    	'orderby' => 'date', // list in date order
    	'paged' => $paged // maintain paging
    );
    query_posts($args);
    ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    [ standard post stuff goes here ]
    <?php endwhile; ?>
    [ next/previous pagination goes here ]
    <?php  endif; ?>
    <?php get_footer(); ?>
  7. cleck673
    Member
    Posted 4 years ago #

    What should I name it and what would be the URL to call it up?

  8. esmi
    Forum Moderator
    Posted 4 years ago #

    Doesn't really matter. Call it something like alt-index.php and upload it to the current theme's folder.

    And you don't use a url to call it. Create a new Page with whatever title you want to use got this blog-style-alternative, then use the Page Template dropdown to assign the Back Issues template. Then publish.

  9. cleck673
    Member
    Posted 4 years ago #

    Thank you very much. I will give this a whirl.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.