My webpage has a certain text on the footer, about 2 paragraphs. However, it is only relevant to pages and not posts.

I would like to hide it on posts. If i do this using CSS display:none will I get penalized even though that text has nothing to do with keywords? It is just a statement, but only relevant on pages.

The text is wrapped in a div with an id. So I use:

.single_post #thatdiv {

I am concerned that search engines might consider it spam by mistake. What do you think?

1 Answer 1


You refer to pages and posts so presumably you're using Wordpress and if you are, you can easily show content based on whether the page is a post or a page which saves you from having to hide anything with CSS anyway.

if ( is_page() ) {
    // This is what you want to show in the footer for pages...

} else {
    // This is what you want to show in the footer for all other pages...

But to answer your question, no, legitimate usage of display: none is not an SEO risk. Google algorithms are pretty clever now and they'll be able to see if you're attempting anything shady and displaying some text copy on one page but not another is not going to make a blind bit of difference to how your pages rank organically.

  • 7
    This is the right way to handle this although your last paragraph is incorrect. That content is not meant to be on that page and users will never see it. There are legit reasons to use display:none but this is not one of those times.
    – John Conde
    Mar 18, 2015 at 17:54
  • @JohnConde can you elaborate?
    – SnakeDoc
    Mar 18, 2015 at 19:31
  • Hmm yes, maybe so @JohnConde but to answer the question, doing what they described is not going to be an "SEO risk" and see their page hindered organically but of course, you're right, content that is not intended to be displayed at all for the user should not be loaded in the first place hence conditional statements included in the answer.
    – zigojacko
    Mar 20, 2015 at 8:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.