Support » Themes and Templates » how to add some text and " read more" next to the post title?

  • 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 !

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Andrew Nevins

    (@anevins)

    Front-end developer

    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?

    thanks friend,

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

    yes as I guessed

    that code just duplicated me the title

    I wanna little text with “read more” link

    Moderator Andrew Nevins

    (@anevins)

    Front-end developer

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

    <?php the_title(); ?>

    With this;

    read more

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

    like that?

    Moderator Andrew Nevins

    (@anevins)

    Front-end developer

    Yes, like that.

    whta this mean ??

    <?php if ( $instance['excerpt'] ) : ?>
    			<?php the_excerpt(); ?>
    			<?php endif; ?>
    Moderator Andrew Nevins

    (@anevins)

    Front-end developer

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘how to add some text and " read more" next to the post title?’ is closed to new replies.