Forums

[resolved] Display all posts on one page (3 posts)

  1. egr103
    Member
    Posted 1 year ago #

    Hi,

    Its quite simple really, I would like to display all posts on one page no matter when they were published (I will introduce pagination also). I don't mean display just each posts title & publish date I would like the full post to be displayed. That includes the content (of the post) in full. Here is the code I have so far on PasteBin http://wordpress.pastebin.com/WMK0hNGv

    This code currently pumps out just the title & the dates, missing out the code i've put in for displaying the actual posts content. The line that keeps being ignored is this:

    <?php
    				$content = apply_filters('the_content', $content);
    				$content = str_replace(']]>', ']]>', $content);
    				?>

    I got that code from the codex pages: under the Alternative Usage section.

    Why won't the full posts content get pumped out aswell? Can anyone help?

  2. blazedd
    Member
    Posted 1 year ago #

    Check this out: http://codex.wordpress.org/Template_Tags/get_posts

    If this doesn't work you will need to do a wpdb query to select all the post manually.

  3. alchymyth
    The Sweeper
    Posted 1 year ago #

    have you considered to get the content from the post and echo the $content string?

    for instance:

    <?php
                                    $content = apply_filters('the_content', $post->post_content);
                                    echo $content = str_replace(']]>', ']]>', $content);
                                    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic