WordPress.org

Forums

how to add some text and " read more" next to the post title? (9 posts)

  1. Morocco English
    Member
    Posted 2 years ago #

    I wanna add the "read more" to my posts in this section code

    <div class="cat_post_thumb">
    			<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
    				<?php the_post_thumbnail( 'cat_post_thumb_size'.$this->id ); ?>
    			</a>
    				</div>
    
    				<div class="cat_post_title">
    			<a class="post-title" href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
    			</div>

    thank you !

  2. Andrew
    Nuh uh moderator
    Posted 2 years ago #

    The Read more link being the same as this link;

    <a class="post-title" href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent link to <?php the_title_attribute(); ?>">
     <?php the_title(); ?>
    </a>

    , but not using the_title?

  3. Morocco English
    Member
    Posted 2 years ago #

    thanks friend,

    I will try
    I guess the title will be duplicated
    let's see

  4. Morocco English
    Member
    Posted 2 years ago #

    yes as I guessed

    that code just duplicated me the title

    I wanna little text with "read more" link

  5. Andrew
    Nuh uh moderator
    Posted 2 years ago #

    Try that duplicated code for now, but just replace this line;

    <?php the_title(); ?>

    With this;

    read more
  6. Morocco English
    Member
    Posted 2 years ago #

    <a class="post-title" href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent link to <?php the_title_attribute(); ?>">
    read more
    </a>

    like that?

  7. Andrew
    Nuh uh moderator
    Posted 2 years ago #

    Yes, like that.

  8. Morocco English
    Member
    Posted 2 years ago #

    whta this mean ??

    <?php if ( $instance['excerpt'] ) : ?>
    			<?php the_excerpt(); ?>
    			<?php endif; ?>
  9. Andrew
    Nuh uh moderator
    Posted 2 years ago #

    Sorry, I don't know what value $instance has.
    - This is what the_exceprt does
    - this is what if statements are

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.