WordPress.org

Ready to get started?Download WordPress

Forums

Adventure Journal
Don't want featured image for each post showing on homepage (3 posts)

  1. Aviva B
    Member
    Posted 2 years ago #

    Hi, All!

    I use Featured Images purely for social media sharing reasons (image that shows when share a link), so I don't want it actually showing on the post. I was able to get it off the post itself by removing the code from the Single Post file, but they still show up on the homepage. Any suggestions?

    The site is: http://growth-in.biz

    Thanks!

    http://wordpress.org/extend/themes/adventure-journal/

  2. david.bailey
    Member
    Posted 2 years ago #

    I would try to do the same edits in the home.php or the index.php where the code for the page is likely executed.

  3. Aviva B
    Member
    Posted 2 years ago #

    Getting back a little late...
    I've been trying to make the edits in the index.php file (no home.php file) and I can't seem to get just the featured image removed without getting rid of the entire header image at the top.

    Here's the relevant section of code (I think) - any suggestions?
    Thanks!
    ***
    <div id="header"><div id="header2"><div id="header3"><div id="header4">
    <?php ctx_aj_site_title() ;?>
    <div id="banner">
    <?php

    //wp_die('||| '.(string)has_post_thumbnail( $post->ID ).' |||');

    // Check if this is a post or page, if it has a thumbnail, and if it's a big one
    if (is_singular()
    && has_post_thumbnail( $post->ID )
    && ( $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID

    ), 'post-thumbnail' ) )
    && $image[1] >= HEADER_IMAGE_WIDTH ) {
    // Houston, we have a new header image!
    echo get_the_post_thumbnail( $post->ID );
    } else if ( get_header_image() ) {
    ?>
    <img src="<?php header_image(); ?>" width="<?php echo

    HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
    <?php } ?>

    </div>

    </div></div></div></div>

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic