WordPress.org

Ready to get started?Download WordPress

Forums

Epic
Remove featured image from posts? (9 posts)

  1. seenandnotseen
    Member
    Posted 8 months ago #

    Hi again,

    I would also like to find a way to keep featured images from being displayed on full blog posts. I need to have featured images for my posts for display elsewhere on the site (i.e. in a slider, etc.) but I don't want the featured image to show up at the top of a post when a reader is viewing the post.

    Can you point me towards the code I need to edit in this theme to stop the featured image from displaying at the beginning of posts?

    Thanks!

  2. seenandnotseen
    Member
    Posted 8 months ago #

    (I realize that I should create a child theme before I change any of the code.)

  3. raajen
    Member
    Posted 8 months ago #

    Which themes you're pointing towards?? Well in most of themes image are displayed with

    if(has_post_thumbnail())
    the_post_thumbnail();
    . You can remove this code to remove the image from being displayed or just put a comment on it
    /*
    if(has_post_thumbnail())
    the_post_thumbnail();
    */
  4. seenandnotseen
    Member
    Posted 8 months ago #

    Ok, I was trying some things and it looks like this worked (I don't know if it's the best way to do this or not):

    I was able to stop featured images from appearing at the beginning of my posts by "commenting out" this bit of code in loop.php:

    <?php sds_featured_image(); ?>

    so it looks like this:

    <!-- <?php sds_featured_image(); ?> -->

  5. raajen
    Member
    Posted 8 months ago #

    If your problem was solved then it's ok.. If you're using any premium or free themes you should consider that you're not going to update theme upon the new updates are released else everything goes in vein... If you're going with child themes then you've to work with all the functions hooked up by theme develoer with you to make it work on your way... Make sure you've little changes and not more if you're going to use child themes...

  6. Which themes you're pointing towards??

    I'm reasonably sure the user means the Epic theme...

    you should consider that you're not going to update theme

    Nope! You should not recommend or suggest that people not update their theme. Often those updates are security related or at least bug fixes.

    You should always use a child theme and make your changes there. It's safer that way.

    http://codex.wordpress.org/Child_Themes

    (I realize that I should create a child theme before I change any of the code.)

    Which it looks like the OP already understands. ;)

  7. Slocum Themes
    Member
    Theme Author

    Posted 8 months ago #

    Hi everyone,

    Thank you for the replies and help.

    @seenandnotseen, it appears that you have found the correct function. We use the sds_featured_image() function to display featured images in our themes. You could simply remove this line in your Child Theme template to stop the output of the featured image. For now, your featured image is still being output to the page though as an HTML comment, which is okay as it is not displayed to the end user. Glad you were able to solve your issue!

    Thank You!

  8. frankpineda
    Member
    Posted 3 months ago #

    Hi,
    Where should I look for this line of code? In which file?

  9. Slocum Themes
    Member
    Theme Author

    Posted 3 months ago #

    Hi frankpineda,

    If you are referring to the sds_featured_image() function, it can be found in virtually all of our templates prefixed with loop (e.g. loop-page.php).

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.