Support » Theme: Twenty Ten » Hide images on homepage

  • Resolved mugamugaw


    I just want to hide the images from the posts on the homepage. Like I want the users to have to click the post to be able to see the image. I know you can do this with the loop or with css but a very detailed step by step guide would be really helpful!

Viewing 2 replies - 1 through 2 (of 2 total)
  • paulwpxp


    Font hero

    First, make sure the posts don’t have gallery post format assigned, AND then decide if you want to keep using the read more tag for all of your post. If so, use the read more tag to make the cut.

    If you don’t want to use read more tag, then there are things to do.

    Make a child theme and override loop.php changing this line

    to this

    <?php if ( is_archive() || is_search() || is_home() ) :  ?>

    To avoid making a child theme, you could instead install a Custom CSS plugin

    and use this code to display none the images on archive and home.

    --------Hide images on archive------- */
    .format-gallery .gallery-thumb,
    .category-gallery .gallery-thumb, #content .gallery, #content img,
    .archive #content .gallery,
    .archive #content img,
    .search #content .gallery,
    .search #content img {
    	display: none;

    It does the job but not as clean, images not visible but still be there in the markup.

    Perfect! Thanks I appreciate it!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide images on homepage’ is closed to new replies.