• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Change CSS for widget on single page?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Change CSS for widget on single page?

This topic is: not resolved

Tagged: css, widget

  • This topic has 1 reply, 2 voices, and was last updated 10 years, 11 months ago by Erik D. Slater.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • June 5, 2015 at 4:11 pm #155033
    keithmoore43
    Member

    Playing with the Genesis framework, I created a Genesis Featured Page widget to go into the primary sidebar, so now it shows up on all the pages I've set for two or more columns. But on many pages the widget isn't lined up with the content field, and I'd like to edit that along with other CSS of this widget on a particular page.

    Using Firebug, I see this widget has the same CSS info on each page, the same class and id. I right-click the widget (blank space near the edge--no image or text), inspect with Firebug and this code is highlighted: <section id="featured-page-2" class="widget featured-content featuredpage">

    I've seen some articles online, along with an awesome Studiopress tech who said I should create a class based on the page itself. At the top of each page is a class "page-id-21", the number different on each page. I've played with that to change features on the page, but the widget remains unchanged.

    Any advice on how to change a widget on one page? I'm thinking it's a combo of the section id above with the class of the "page-id-21", but I haven't figured it out yet.

    Really cool advice on this board--thanks.

    June 5, 2015 at 4:54 pm #155037
    Erik D. Slater
    Member

    I wouldn't use the page-id class directly. If you ever decide to move things around and that identifier changes, you will be an unhappy bunny 🙂

    Instead, add a class to the Custom Body Class field in the Layout Settings of your page, e.g. km-groovy-page ... then you can access any CSS selector for that page, for example:
    .km-groovy-page .widget-title
    or
    .km-groovy-page #featured-page-2

    Beyond that, provide us with a link so that we helpful folk can get you sorted out 🙂


    Erik D. Slater: Digital Platform Consultant • LinkedIn
  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble