Support » Fixing WordPress » How can I exclude an image from the main page?

  • Resolved csowsley


    I’m stuck. Using a modified theme from Empire, I have a column on the front page which calls the latest blog posts that works fine but not exactly how I’d like it to work. It includes the image in the post.
    Does anyone know how to call only the text above the <!–more–> tag and exclude images added in the post?
    Right now all I can do is insert the image below the more tag as a work around. I’d rather just exclude images from the front page all together. Here is the div from the main page:
    <div class=”latest-blog”>

    <h3>From the Blog</h3>

    <?php query_posts(“showposts=1”);
    query_posts(‘category_name=General’); global $more; $more=0;?>

    <?php while (have_posts()) : the_post(); global $more; $more=0;?>

    <h4>” rel=”bookmark” title=”Go to <?php the_title_attribute(); ?>”><?php the_title(); ?></h4>
    <div class=”latest-entry”>
    <?php the_content(‘Read more…’, $more_link_text, $strip_teaser, $more_file ); ?>

    <p class=”meta”>Written on <?php the_date(); ?></p>
    <?php endwhile; ?>


    Is there anything I can do?
    Any bit of help is greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you want just a bit of text from the posts, you could try using the_excerpt template tag instead of the_content.

    Thanks. I tried that but it doesn’t keep the ‘share’ links. I came up with a work-around that satisfies the problem for the time being- I put the inserted image below the ‘more’ tag. Not exactly what I wanted, but it does the job.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How can I exclude an image from the main page?’ is closed to new replies.