WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Image in single but not in post (7 posts)

  1. spiritbased
    Member
    Posted 7 years ago #

    Hi

    I'd like to have my list of posts to be text only, but when folks click on them to go to single templates I want them to see the related image.

    Alternatively, I'd like a really small thumbnail in the post list and full-size pic in the single template.

    A little help guys and girls?

  2. Kafkaesqui

    Posted 7 years ago #

    One way is to use the <!--more--> tag in your posts, placing the image right after it.

  3. spiritbased
    Member
    Posted 7 years ago #

    That's cool, but how can I stop the "read more about this article" text appearing?

  4. Kafkaesqui

    Posted 7 years ago #

    The 'more' link text is controlled through the first argument of the_content() template tag. You can *blank* it out by providing an empty value to it:

    <?php the_content(''); >`

  5. spiritbased
    Member
    Posted 7 years ago #

    Thanks for your help...

    but where do I find the content template tag in my code?

  6. Kafkaesqui

    Posted 7 years ago #

    Normally it's in the various theme's 'top level' templates such as index.php or single.php. This provides a hierarchy of (possible) templates a theme might use:

    http://codex.wordpress.org/Template_Hierarchy

    If you can't locate it in a template, it's likely that A. the theme is using the_excerpt() the display a post's summary (in which case you'll have to modify it to the_content() for my idea to work), or B. the theme includes a theme-specific template to generate all or part of The Loop. Often this so-called template is named post.php.

  7. spiritbased
    Member
    Posted 7 years ago #

    Thanks for your patience - this works an absolute treat!

Topic Closed

This topic has been closed to new replies.

About this Topic