Support » Fixing WordPress » How to identify page ID of homepage?

  • Resolved anneyu

    (@anneyu)


    Is there a way to determine the page ID of the homepage itself? The homepage doesn’t appear on Pages and I’ve tried using Inspect on Chrome but did not find any.

    Reason: Would like to do some minor custom CSS for the homepage only.

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

    The homepage itself is identified as the Main Index Template (index.php). You can add custom CSS in the following way.

    wp-admin > Appearance > Customize > Additional CSS.

    Kyle

    Moderator bcworkz

    (@bcworkz)

    If your home page is a blog listing, it would not be listed in pages. It’s theme dependent, but many themes have a home class in the body tag on only the home page. If so, your CSS can target only the home page by including body.home as part of the CSS selector.

    Use your browser’s Elements Developer Tool (name varies by browser) to help you determine which elements to target, what selector will work for that, and which rules accomplish what you want. Once you have things dialed in with the tool, copy the applicable code to the Additional CSS panel like Kyle suggested.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to identify page ID of homepage?’ is closed to new replies.