WordPress.org

Ready to get started?Download WordPress

Forums

Spun
[resolved] Prevent pictures from showing up in circles (7 posts)

  1. MWilming
    Member
    Posted 1 year ago #

    This theme is really awesome. There is only one thing I'd like to change: How can I prevent images from showing up in the circles? I'd like to only have the post titles in the circles, no pictures. Is there any simple way to do this?

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    At the moment do you have text and images?

  3. MWilming
    Member
    Posted 1 year ago #

    No, only the image if one is included in the post.

  4. Caroline Moore
    Member
    Theme Author

    Posted 1 year ago #

    The non-code solution: Don't upload or attach any images directly to your posts. Upload them to the Media Library and include them in your content later.

    The code solution: Create a child theme, and copy content-home.php into the child theme. Then replace these two lines:

    <article id="post-<?php the_ID(); ?>" <?php post_class( $postclass ); ?>>
    <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php echo $thumb; ?></a>

    With this:

    <article id="post-<?php the_ID(); ?>" <?php post_class( 'no-thumbnail' ); ?>>
    <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><span class="no-thumbnail"><?php the_title(); ?></span></a>
  5. MWilming
    Member
    Posted 1 year ago #

    Caroline, this is great! Didn't think it could be so easy. Thanks a lot!!

  6. Caroline Moore
    Member
    Theme Author

    Posted 1 year ago #

    You're welcome! Glad I could help.

  7. feras55
    Member
    Posted 1 year ago #

    Is it possible to have a mix? Have a few circles display image only and the other few with the text title only? All my posts have images in the content, but I would like the circles on my homepage to display a variation of both texts and images.
    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.