• Hi Everybody,

    I want to remove excerpt optional from the main post page (which is written under the title of the post.)

    I already used this code to remove excerpt from page.

    div.post-excerpt p {
    display: none;}

    But there is a problem, when i put this code in Customizer –> Additional CSS.
    It remove all excerpt from complete website. But I want to remove excerpt from only the Main post page & Categories page and not the whole website.
    Please someone told me what is the code to do this.

    Can anybody guide me about the right way!
    Thanks in advance!

    Hammad

    • This topic was modified 4 years, 5 months ago by hammadraza.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello @hammadraza
    Thank you for using CoverNews.

    Do you mean to hide the excerpt text that is appear on the single post page which is under the title?
    If then, please add the below CSS codes,

    
    .single .post-excerpt {
        display: none;
    }

    If you mean anything different, please let us know.

    Thank you

    Thread Starter hammadraza

    (@hammadraza)

    Hi @afhelpteam,

    Thank you so much for answering.

    Yes, I want to hide the excerpt text that is appear on the single post page.
    But I also want to hide excerpt text of post in category pages, and not on the main page of website.

    I use this code.

    div.post-description
    {display: none;}

    But this code hide excerpt of a complete website.
    I want excerpt only shown in front page of website and in search sesults, not any where else.

    Thanks in advance!

    Hammad

    • This reply was modified 4 years, 5 months ago by hammadraza.

    Please add this CSS once and check it.
    If you mean something different, then please let us know with the screenshot. We will give you the solution based on it.

    .archive .post-description {
        display: none;
    }

    Thank you

    But, I think using display: none is not good for SEO. As Google wouldn’t rank a website using it well. Like, to Google, malicious things are been hidden. This display: none;, is mostly used by hackers to hide their clone website identity. Making this a red flag for Google search engine ranking.

    Can this be removed without using it? Just want to know if there is other ways.

    Much thanks, @afhelpteam. I LOVE YOUR THEME.

    Hello @ayjtech
    If you are family with the codes, then you can edit the code from content.php file. You can remove the excerpt code from there. If you are not familiar with codes, you can hire the developer.

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to remove excerpt optional from the main post page?’ is closed to new replies.