Support » Fixing WordPress » access to “more text”?

  • saadiq


    I’m in the midst of moving my photoblog over to WP 1.3 from MT. MT provides an entry field and an extended entry field and WP seems do the same using the <!– more –> tag. I have looked around in the forums and the wiki(s) but there doesn’t seem to be a way to fetch just that extended text. Am I wrong?
    This seems to be fine for a text blog because the content is all text and can be handled as one entity. However, with a photoblog, it works nicely to have the entry be the main image, the “more” text to be optional text or description accompanying the image and then the excerpt being the thumbnail. Then if you can access each of those elements, you have a bit more flexibility in layout. (Yes, I’m sure I can could handle it by putting the image tag in a custom tag, but I’m currently working from the way the mt-import.php script placed my data.)
    The question is if there is a way to access that text outside of “the_content()” that I have overlooked? If there isn’t, I’ll write a plugin to access it but I also wanted to make the case for this addition to the core. I think the extra flexibility wouldn’t hurt the masses and it would facilitate in particular photo sites.

Viewing 3 replies - 1 through 3 (of 3 total)
  • DarkCryst


    Thanks for the follow-up. Thats pretty useful to know, I’m sure its written somewhere (maybe the Wiki) but I had forgotten it.


    Yeah, it turned out to be quite easy. But if you’re using that, you might also want the ability to fetch just the teaser without the rest of the post. This was the best I could come up with for a single listing page. I’d love to know if anyone can do better.
    <?php global $more; $tmp = $more; $more = ''; the_content(''); $more = $tmp; ?>
    It uses the $more global to trick the_content() into displaying the more link instead of displaying the full entry and it passes an empty string so that the more link doesn’t actually show up. It ain’t pretty but it works.



    Oops… that last one was me.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘access to “more text”?’ is closed to new replies.