Forums

[resolved] Change continue reading link when there is nothing more to read (3 posts)

  1. yayitsdan
    Member
    Posted 1 year ago #

    I'm sure this is possible, but I haven't been able to find anything. I want to change the "continue reading" link on the_content that show the full post (because the post itself is short) to link to "post a comment". Any help would be great, thanks!

    Edit: Here is how I'm calling the read more:

    div class="postcontinue">
    <?php if (is_single() || is_page()) : ?>
    <?php else : ?>
    <a>" title="<?php the_title_attribute(); ?>"><div id="continuereading"> Continue Reading   </div> </a><a>"<img src="<?php bloginfo('template_url'); ?>/images/continue.gif" /> </a>
    <?php endif; ?>
    </div>
  2. yayitsdan
    Member
    Posted 1 year ago #

    I found a new direction to try. I'm now adding a read more link based on if the post has a break. I just need to figure out how to add a link if there isn't a break. Is there a way to check if a page has a break or not?

  3. yayitsdan
    Member
    Posted 1 year ago #

    I figured it out for anyone who is having the same problem. I was able to check to see if the <!--more--> was being used or not with:

    <?php if ($pos=strpos($post->post_content, '<!--more-->')): ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags