WordPress.org

Ready to get started?Download WordPress

Forums

Excluding Featured Images From The Homepage (4 posts)

  1. thisispeter
    Member
    Posted 3 years ago #

    This may be a simple question to answer but after several hours I have not found a solution, so I am looking for some help.

    I am running the Modern Clix Theme under WP 3.0.1 and I am looking for a way to exclude the feature image on the homepage. I still however want the image to appear in the main post. So the homepage will just be text.

    I have seen it on another post. So I know its possible. However not knowing any PHP. Leads me to think its difficult.

    http://whycreativefizz.com/thisispeter

  2. panther8
    Member
    Posted 3 years ago #

    Hi Peter, its not that easy, I guess. You would have to delete the php code-snippet that includes the images within the index.php file of your theme..., which is not so easy to spot, if you have no knowledge about PHP.

    However, one way around this problem would be to just include the image within your article... Depending on your theme (!), it will then only show up on the article site, instead of the homepage, unless your theme automatically grabs the image from your post and includes it into the homepage.

  3. simplistik
    Member
    Posted 3 years ago #

    From the looks of it, the Modern Clix theme isn't actually using the post-thumbnail feature. Seems as if you are embedding that featured image in your body. So here are a couple ways to approach it:

    1. Use post-thumbnails instead of embedding it in your body:
    http://codex.wordpress.org/Post_Thumbnails#Function_Reference

    or

    2. In the index.php where it says:
    <?php the_content('Continue reading...'); ?>

    you can change that to something like (untested code):

    if ( is_front_page() ):
      echo strip_tags(get_the_content('Continue reading...'), '<p><em><b><a>');
    else:
      the_content('Continue reading...');
    endif;
  4. thisispeter
    Member
    Posted 3 years ago #

    Just as I thought. For a novice like me it seems that there is going to be some serious work to do here. For now I have taken advantage of the More tag to move the picture after the continue reading section. Until I brush up on my PHP this will have to suffice.

    However many thanks for your posts. At least I know now.

Topic Closed

This topic has been closed to new replies.

About this Topic