Need to fix a Wordpress issue!

Discussion in 'WordPress' started by sanchyclub, Jan 17, 2012.

  1. #1
    hi mate,

    I have a wordpress blog and I'm trying to customize it. But unfortunately I got a situation here!

    I need to add a 'continue reading or read more' option for all of my posts in almost all pages [home/categorys/tags]

    Maybe it will show first <p> and then 'read more...' link. Can you advice how to do that?

    My blog: http://blog.ssanchy.com/

    Thanks,
     
    sanchyclub, Jan 17, 2012 IP
  2. Nigel Lew

    Nigel Lew Notable Member

    Messages:
    4,642
    Likes Received:
    406
    Best Answers:
    21
    Trophy Points:
    295
    #2
    Nigel Lew, Jan 17, 2012 IP
    sanchyclub likes this.
  3. sanchyclub

    sanchyclub Well-Known Member

    Messages:
    625
    Likes Received:
    6
    Best Answers:
    2
    Trophy Points:
    105
    #3
    hi nigel, thanks for your reply. bit I'm still confused because there code structure (index) and my structure is not so same... pls take a look on my index:

    <?php get_header(); ?>
    <div id="main-top">
    <h4><?php _e( 'Recent Articles', 'traction' ); ?></h4>
    </div>
    <div id="main" class="clear">
    <div id="content">
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div id="post-<?php the_ID(); ?>" <?php post_class( 'clear' ); ?>>
    <div class="date">
    <div class="day"><?php the_time(__( 'j' )); ?></div>
    <div class="month"><?php the_time(__ ( 'M', 'traction' )); ?></div>
    </div>
    <?php if ( has_post_thumbnail() ) { ?>
    <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_post_thumbnail( 'index-thumb', array( 'class' => 'index-post-thm alignleft border' ) ); ?></a>
    <?php } ?>
    <div class="entry <?php if ( !has_post_thumbnail() ) echo 'nothumb'; ?>">
    <h2 class="title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    <?php the_content( __( 'Read more', 'traction' ) ); ?>
    <?php edit_post_link(__( 'Edit', 'traction' )); ?>
    </div><!--end entry-->
    </div><!--end post-->
    <?php endwhile; /* rewind or continue if all posts have been fetched */ ?>
    <div class="navigation index">
    <div class="alignleft"><?php next_posts_link(__ ( '&laquo; Older Entries', 'traction' )); ?></div>
    <div class="alignright"><?php previous_posts_link(__ ( 'Newer Entries &raquo;', 'traction' )); ?></div>
    </div><!--end navigation-->
    <?php else : ?>
    <?php endif; ?>
    </div><!--end content-->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
     
    sanchyclub, Jan 17, 2012 IP
  4. hmansfield

    hmansfield Guest

    Messages:
    7,904
    Likes Received:
    298
    Best Answers:
    0
    Trophy Points:
    280
    #4
    It really depends on how your theme operates.
    If your theme utilizes excerpts to display a portion of the post on archive pages, then you just need to add the excerpt and the "read more" link is likely coded in already.

    If you just want to cut your posts off at a certain point, then you need to place the "read more " link in manually where you need it on a post by post basis.

    Otherwise, what was said before...you'll have to edit the Single.php file to place it manually after a certain number of characters.

    Try replacing the_content() with the_excerpt().

    Maybe check this support thread:
    http://wordpress.org/support/topic/limit-amount-of-characters-to-show-on-post-preview
     
    hmansfield, Jan 17, 2012 IP
    sanchyclub likes this.
  5. sanchyclub

    sanchyclub Well-Known Member

    Messages:
    625
    Likes Received:
    6
    Best Answers:
    2
    Trophy Points:
    105
    #5
    sorted it. thanks
     
    sanchyclub, Jan 17, 2012 IP