• 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

How and where to change genesis file : "featured-post-widget.php" ?

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 › How and where to change genesis file : "featured-post-widget.php" ?

This topic is: resolved

Tagged: featured posts widget

  • This topic has 4 replies, 3 voices, and was last updated 9 years, 8 months ago by tatziki.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • May 30, 2016 at 5:05 am #186496
    tatziki
    Member

    Hi and thanks a lot for this very helpfull forum,

    I'd like to change something in the genesis file featured-post-widget.php.
    (I just want to add my custom posts)
    But how can I change it without breaking the original one ?
    I tried to make a copy (custom-widget-feature.php) for my child-theme, but when I include it into my functions.php with the instruction :
    require_once( GENESIS_WIDGETS_DIR . '/lib/custom-widget-feature.php' ); I get a mistake...

    Thanks for your help.

    May 30, 2016 at 5:17 am #186498
    Victor Font
    Moderator

    Copying the widget is the right thing to do. You don't ever want to change a file delivered with the Genesis Framework because when Genesis gets updated you'll lose all of your customizations.

    You didn't mention the error, but I'll bet it has something to do with duplicate declarations or something along those lines. When you copy a widget, you need to change a few things before you can use it. You need to make sure you've changed the class name in the new widget. Change class Genesis_Featured_Post extends WP_Widget to class Custom_Widget_Feature extends WP_Widget. There may be other things that need to be renamed, but without seeing the errors, I can't tell you.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    May 30, 2016 at 6:35 am #186501
    tatziki
    Member

    Always so reagent, thank you !!
    Difficult to identify the error (php error at first, and now blank page with the Custom_Widget_Feature)
    I fear It becames too hard for me to create a custom widget, and above all, I'm not sure anymore that a widget is the best way to do what I want.

    Thanks again for your help and sorry for the trouble

    May 30, 2016 at 11:40 am #186517
    Brad Dalton
    Participant

    Here's the code for creating a custom genesis featured posts widget.


    Tutorials for StudioPress Themes.

    May 31, 2016 at 4:41 am #186547
    tatziki
    Member

    Oh yeahhh, a second musketeer !
    Great, I will carefully follow your guide.

    Thanks a lot

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘How and where to change genesis file : "featured-post-widget.php" ?’ is closed to new 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