• 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

Overwrite the "featured-post-widget.php" in a Child Theme

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 › General Discussion › Overwrite the "featured-post-widget.php" in a Child Theme

This topic is: not resolved

Tagged: child theme

  • This topic has 2 replies, 2 voices, and was last updated 10 years, 7 months ago by bousquet.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • November 10, 2015 at 12:38 pm #170705
    bousquet
    Member

    Hi,

    i use the "News Pro" Child Theme, and want to include the "featured-post-widget.php" file in this child theme,
    to make some minor changes (change the "h2" in the file to a simple "p")

    how can i do that?

    I created the folder structure /lib/widgets in my child theme, and copied the "featured-post-widget.php" in there,
    but nothing changes after i edit the file.

    do i have to make any further changes to overwrite the genesis core file with a file in my child theme?

    thanks,
    martin

    November 10, 2015 at 2:15 pm #170714
    Brad Dalton
    Participant

    1. You need to include the file using require_once
    2. Unregister the default widget
    3. Register the new widget class
    4. And change all instances of the class name in the copied file

    Then you can make changes.

    You can't copy over the file unless you make these changes.


    Tutorials for StudioPress Themes.

    November 12, 2015 at 2:57 am #170827
    bousquet
    Member

    thanks!

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ 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