• How to hide excerpt and featured image from the front page.
    I want only the title to display in the front page. Or else title along with a small thumbnail if featured image to the left of title.
    My site is https://www.serialspot.in

    There is some gap between image and the title/content. Is there any way to reduce it?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    You could try this CSS code:

    #home-content article.post { overflow: hidden; padding: 0 20px; }
    #home-content .post-thumb { height: auto; width: 25%; float: left; }
    #home-content .post-content { width: 75%; margin: 0; float: left; }

    You can make this responsive by adding this also:

    @media screen and (max-width: 620px) {
    #home-content article.post { padding: 0 0 0 20px; }
    #home-content .post-thumb { width: 35%; }
    #home-content .post-content { width: 65%; }
    }
    @media screen and (max-width: 420px) {
    #home-content article.post { padding: 0; }
    #home-content .post-thumb { width: 100%; }
    #home-content .post-content { width: 100%; margin: 20px 0 0; }
    }

    As with all custom code modifications, you should add the above via the use of a Child Theme, or custom CSS plugin, to ensure your code remains should you update the main theme in the future.

    Hope this helps.

    Thread Starter serialspot

    (@serialspot)

    Thanks a lot for replying.
    I pasted in a custom CSS plugin and now the featured image is appearing to the left of the title. Glad it worked.

    Can u help me how to hide excerpt from the home page?
    Also i want a code for specifying maximum image size of featured image appearing in front page next to title.

    Remove text excerpt from homepage:

    #home-content .entry-content p { display: none; }

    And your image width is now being defined by the code I gave you earlier, the width of both .post-thumb and .post-content must equal to 100%, so if you increase the thumbnail size from 25% to 35% then you must reduce the content width by the same amount, from 75% to 65%.

    Hope this helps.

    Thread Starter serialspot

    (@serialspot)

    thankyou so much.
    Both the codes worked so easily in just a few mins and i was searching for the codes for hours.

    You’re very welcome.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Hide excerpt from home page’ is closed to new replies.