• 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

Use a widget I have on the front page on other pages as well

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 › Use a widget I have on the front page on other pages as well

This topic is: not resolved

Tagged: Enterprise Pro

  • This topic has 6 replies, 2 voices, and was last updated 7 years, 4 months ago by Andras.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • February 25, 2018 at 1:25 pm #216990
    Andras
    Participant

    Hello,

    I am working on an Enterprise Pro theme. This theme comes with a great widget on the front page, that lets me fill in info in three nicely separated columns.

    I would like to use this widget also on other pages. Is this possible?

    February 25, 2018 at 3:28 pm #216992
    Brad Dalton
    Participant

    Yes, take the PHP code for the widget and use it in your functions file.


    Tutorials for StudioPress Themes.

    February 25, 2018 at 5:13 pm #216999
    Andras
    Participant

    Hi Brad,

    Thank you for your reply!

    I tried to follow your advice, but you must have meant something else.

    I found this in the fron-page.php and copied it into funcitons.php:

    function enterprise_home_bottom_widgets() {

    genesis_widget_area( 'home-bottom', array(
    'before' => '<div class="home-bottom widget-area">',
    'after' => '</div>',
    ) );

    }

    genesis();

    I got the following error message:

    Your PHP code changes were rolled back due to an error on line 55 of file wp-content/themes/enterprise-pro/front-page.php. Please fix and try saving again.

    Cannot redeclare enterprise_home_bottom_widgets() (previously declared in wp-content/themes/enterprise-pro/functions.php:127)

    What should I do different?

    February 25, 2018 at 5:33 pm #217000
    Brad Dalton
    Participant

    Don't add the genesis(); function but do add the add_action function with hook.

    add_action( 'genesis_after_header', 'enterprise_custom_top_widget' );
    function enterprise_custom_top_widget() {
    

    And always use a unique function name.


    Tutorials for StudioPress Themes.

    February 26, 2018 at 3:53 am #217015
    Andras
    Participant

    Thank you Brad! Now I got it right 🙂

    The website was also helpful.

    February 26, 2018 at 4:02 am #217016
    Andras
    Participant

    Great, I got the three column widget from the front page repeated on some other page. Can I change the text within the widget on the "other page", or will it be always identical to the text in the front page?

    February 26, 2018 at 4:09 am #217017
    Andras
    Participant

    Ooops, I can see the widget in every page now. Can I have it on one specific page?

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Use a widget I have on the front page on other pages as well’ 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

© 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