WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Making a page that lists all 'posts topics' ? (9 posts)

  1. ps2cho
    Member
    Posted 3 years ago #

    Hi guys,

    I have a ton of really long DIY posts on my site 'ps2cho.net'
    I would like to have a page that just 'lists' each one, but not actually put the entire post in as it would make a giant page..

    Any ideas how I could accomplish this? Is it even possible?

    Thanks!

  2. Tara
    Member
    Posted 3 years ago #

  3. ps2cho
    Member
    Posted 3 years ago #

    That is exactly what I am trying to do, but there is no code on that page for it :(

    I just want a list of all my 'posts'

    I am not very good at any sort of coding at all.

  4. Tara
    Member
    Posted 3 years ago #

    xyzzyy placed the code in pastebib at http://wordpress.pastebin.ca/1747743.

  5. ps2cho
    Member
    Posted 3 years ago #

    I managed to find a 'template' which does exactly what i want...

    <?php
    /*
    Template Name: All posts
    */
    ?>
    <?php
    $debut = 0; //The first article to be displayed
    ?>
    <?php while(have_posts()) : the_post(); ?>
    <h2><?php the_title(); ?></h2>
    <ul>
    <?php
    $myposts = get_posts('numberposts=-1&offset=$debut');
    foreach($myposts as $post) :
    ?>
    <li><?php the_time('d/m/y') ?>: <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    <?php endforeach; ?>
    </ul>
    <?php endwhile; ?>

    ---

    But it does not integrate with the page. It just links to a blank page. How do I intergrate it into my site with the layout etc..?

  6. ps2cho
    Member
    Posted 3 years ago #

    t-p:

    The link is invalid:

    Sorry, an error has occurred. Reason: That is an invalid ID, or the post has expired.

  7. Tara
    Member
    Posted 3 years ago #

    looks like contents in the pastebin remian for a limited time only.

    After this:

    `<?php
    /*
    Template Name: All posts
    */`

    Try placing this:

    get_header(); ?>
    
    <div id="container">
    			<div id="content" role="main">

    If does not help, then someone who knows this stuff can takeover from here.

  8. ps2cho
    Member
    Posted 3 years ago #

    Well that got me half the page to display...but no links or anything else. I'll leave it as it is so you can see what I mean:
    http://ps2cho.net/

    vs:

    http://ps2cho.net/?page_id=96

    Thanks for the help though.

  9. ps2cho
    Member
    Posted 3 years ago #

    Oh damn I managed to find a perfect plugin that does the trick!
    http://www.skepo.info/web-development/wordpress/simple-posts-list

    For future search reference!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.