Hide Featured Image on Two Pages

  • Unknown's avatar

    I’d like to add featured images to my “about” and “contact” pages, but then hide them when someone actually goes to the page. Is there a custom code I can add?

    The blog I need help with is: (visible only to logged in users)

  • You can hide featured images on the About and Contact pages following this format:

    .page-id-2 .header-image, .page-id-3 .header-image {
      display: none;
    }

    You can add more page IDs by viewing the body tag using an inspector or by viewing the browser’s source. You need to add more selectors separated by commas, following the example above.

    Let me know how it goes.

  • The topic ‘Hide Featured Image on Two Pages’ is closed to new replies.