• 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

Add custom CSS class to Genesis featured posts

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 › Add custom CSS class to Genesis featured posts

This topic is: not resolved

Tagged: class, css, genesis featured posts

  • This topic has 3 replies, 2 voices, and was last updated 6 years, 11 months ago by canpress5.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • May 28, 2018 at 3:01 pm #220309
    canpress5
    Member

    I would like to add a custom class to the output of the Genesis featured posts widget.
    The default output is:
    <section id="featured-post-1" class="widget featured-content featuredpost">

    I would like to add a new custom class as follows:
    <section id="featured-post-1" class="widget featured-content featuredpost mynewclass">

    I'm using the Infinity Pro theme, but I imagine the solution will work for all themes.

    Can anyone point me in the right direction?

    Thanks in advance.

    May 28, 2018 at 3:51 pm #220311
    canpress5
    Member

    Further to the above post, in the genesis core file genesis>lib>widgets>featured-post-widget.php I have found where the default classes are assigned around line 64:

    $widget_ops = array(
    			'classname'   => 'featured-content featuredpost',
    			'description' => __( 'Displays featured posts with thumbnails', 'genesis' ),
    		);

    I could add my new class there however it is not recommended to edit core files and I am unsure how to filter this in my child theme's functions.php?

    May 29, 2018 at 5:18 am #220339
    Andrea Rennick
    Member

    The widget already has a custom class of featuredpost that only applies to the featured posts widget and nothing else.

    What are you trying to do that can't use the existing custom class?


    **forum signature**
    If you need technical support for your theme please file a ticket.

    The forums are community based. Staff only monitors the forum for issues relating to the forum itself and to redirect users to where they need to go.

    May 29, 2018 at 11:36 am #220352
    canpress5
    Member

    Andrea, thank you for your input.

    What are you trying to do that can't use the existing custom class?

    I want to use the existing fadeup-effect class from Infinity Pro which references the front-page.js file, so to use the existing featuredpost class I would also need to edit the .js file, which is not as straightforward as simply adding styles to the featuredpost class. I was hoping that adding the fadeup-effect class to the featured post would be an easier option.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 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

© 2025 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