Ready to get started?Download WordPress


How to NOT display post image (Text & Image seperately) (6 posts)

  1. Shirohagen
    Posted 7 years ago #


    I know this seems like a stupid question, but how can I NOT show the post image in a particular post? I want to insert the IMG tag as normal to include an image, but then in my template file I only want to show the post's TEXT, as I'm using the Image-Extractor plugin to display the relevant post image elsewhere in the template.

    So basically, how can I ignore the IMG tag in the original post, or somehow use some paramenters with the_content to only show the text? Is there a the_post function?

    An example is here:

    The first image is shown as part of the post, while the second copy is being displayed by the plugin, at the point on the template I need the post image to appear.

    Any ideas?


  2. Shirohagen
    Posted 7 years ago #

    Just had a thought, could I use the <---more> quicktag after the post text, then bung in the IMG tag after it? That way I could set my template up to only show the_content up to the <---more> tag and thereby hide the image? Then I can use the Image Extractor plugin to display the image elsewhere...? Does the <---more> tag work like this?

    Any other ideas would be gratefully received...


  3. Shirohagen
    Posted 7 years ago #

    OK, it seems it's just me wondering about this, but if anyone else should come across this thread wondering the same thing, I have replaced the_content with the_excerpt which seems to be working...


  4. DokterWolf
    Posted 7 years ago #

    This would interest me to.

    I tried also the excerpt but this isn't a good solution for mee. The excerpt reloaded also gives me problems with the excisting more tags...

    anybody knows how to remove the image from the_content?

  5. DokterWolf
    Posted 7 years ago #

    This would work:

    putin your css file:

    .hide img {
    display: none;

    end wherever you need it:

    <div class="hide"><?php the_content('Read more...'); ?>

  6. Shirohagen
    Posted 6 years ago #


    In case anyone is interested, I did eventually find a way to do this, although I'm still working on the site.

    To display the image only I used the Image Extractor plugin:

    And then to display the text, I used The_Extract Reloaded plugin, which gives you a bit more control than the standard excerpt:

    That's pretty much it, it allowed me to put the image under the text on the portfolio pages and have a nice wide graphic separate from the info.

    Hope this helps...!


Topic Closed

This topic has been closed to new replies.

About this Topic