wordpress - display titles and content

Discussion in 'WordPress' started by sensoryaddict, Jan 25, 2011.

  1. #1
    Hi,

    I am currently using this code to display the latest 10 posts on my homepage.

    <?php wp_get_archives('title_li=&type=postbypost&limit=10'); ?>

    How can I also get the content? I want to display the first 100 characters.

    Help appreciated.
     
    sensoryaddict, Jan 25, 2011 IP
  2. Dodger

    Dodger Peon

    Messages:
    1,494
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Read about it in the WordPress Codex. See The Loop for all the answers you are looking for.
     
    Dodger, Jan 25, 2011 IP
  3. webbrad

    webbrad Greenhorn

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    there are some excerpts plugins which helps to display content on homepage with small excerpt, image and post link. you can try wp-utf8-excerpt plugin.
     
    webbrad, Jan 25, 2011 IP
  4. Jalpari

    Jalpari Notable Member

    Messages:
    5,640
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #4
    <?php the_content( __('<p>Read the rest of this entry &raquo;</p>', '150') ); ?>
     
    Jalpari, Jan 26, 2011 IP
  5. Dodger

    Dodger Peon

    Messages:
    1,494
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    0
    #5
    There is more to it than just that. Need to set up the query loop, insert thumbnails (if wanted), bylines & meta (if wanted), category restrictions, etc. etc.
     
    Dodger, Jan 26, 2011 IP
  6. rozer82

    rozer82 Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    <?php the_content( __('<p>Read the rest of this entry &raquo;</p>', '100') ); ?>
     
    rozer82, Jan 26, 2011 IP
  7. Dodger

    Dodger Peon

    Messages:
    1,494
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    0
    #7
    That is what the other guy said. Read my answer, there is more to it than that.
     
    Dodger, Jan 27, 2011 IP