• 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

Metro theme: adding "Welcome Text" widget per B Gardner's code – help?

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 › Metro theme: adding "Welcome Text" widget per B Gardner's code – help?

This topic is: resolved
  • This topic has 28 replies, 4 voices, and was last updated 12 years, 1 month ago by Jen Baumann.
Viewing 20 posts - 1 through 20 (of 29 total)
1 2 →
  • Author
    Posts
  • May 4, 2013 at 11:16 am #39277
    kay9
    Participant

    Hi, I'm trying to follow B Gardner's tutorial here as to how to add a "Welcome Text" widget to a Genesis child theme (Metro, in this case).

    The code is easy enough, cut and pasted in as he said to do in the tutorial.

    BUT ... the text of the welcome area widget is NOT responding to the CSS I have -- it is defaulting to the "default" text (in both style AND in size). I want it to be in a larger size and font (Oswald, perhaps; which is the font for the theme's headlines, yes?).

    Can someone tell me why the CSS isn't working? I have looked at it with Firebug and still can't figure out what change to the CSS I need to make to change the font for that widget area AND the size of the font for that widget area. Perhaps the tutorial will not work for the Metro theme?

    Thanks in advance for clues!

    The site is here. You can see the default font and font-size in the "welcome" widget area at the top of the front page.

    May 5, 2013 at 3:07 am #39331
    Brad Dalton
    Participant

    Try this:

    .welcome-text p {
        font-size: 24px;
        font-family: Georgia;
        line-height: 1.0;
        margin: 0;
    }
    

    What happens if you change this part of the code and add a font-family?

    font-size: inherit;
    font-family: Georgia;
    

    Tutorials for StudioPress Themes.

    May 5, 2013 at 3:18 am #39336
    kay9
    Participant

    Thanks for the reply! Hmm, NOTHING happened. I just tried every combo I could think of!

    There must be something else going on here, and it's too far above my pay grade to understand. 🙁

    May 5, 2013 at 8:13 am #39353
    Brad Dalton
    Participant

    Sometimes the changes can take time to show up especially if you have server side caching.


    Tutorials for StudioPress Themes.

    May 5, 2013 at 9:36 am #39371
    kay9
    Participant

    Hm, no, nothing like that, I don't think. I may try posting this on the thread at Brian's website where he originally posted this tutorial, and see if he responds. Thank you though, for trying to help me! I do appreciate it very much. 🙂

    May 5, 2013 at 10:03 am #39377
    AnitaC
    Keymaster

    Brian included this CSS on that post. Did you add it to your style sheet? Maybe you overlooked this part, but it works just fine for me.

    /* Welcome Text
    ------------------------------------------------------------ */
    
    .welcome-text {
        border-bottom: double #ddd;
        border-top: double #ddd;
        font-family: 'Lora', serif;
        font-size: 30px;
        line-height: 1.0;
        overflow: hidden;
        padding: 25px 0;
        text-align: center;
    }
    
    .welcome-text p {
        font-size: inherit;
        line-height: 1.0;
        margin: 0;
    }

    Need help with customization or troubleshooting? Reach out to me.

    May 5, 2013 at 10:05 am #39378
    kay9
    Participant

    Nope, as I said above, I cut and pasted all, following his tutorial.

    May 5, 2013 at 10:09 am #39379
    AnitaC
    Keymaster

    Just looked at your code -

    You are missing the closing */ on the end here -

    /* Welcome Text
    ------------------------------------------------------------ */


    Need help with customization or troubleshooting? Reach out to me.

    May 5, 2013 at 10:11 am #39380
    kay9
    Participant

    Ohh no, I have his code commented out just below my version of it! Above 🙂

    Just removed his version so it doesn't confuse. Anything else going on that explains why it isn't working?

    Thank you for trying! 🙂

    May 5, 2013 at 10:21 am #39382
    AnitaC
    Keymaster

    I think you have another conflict going on there. I am using this as a Demo site here and it's working fine. I even tried to add my code to your site via Firebug and it's not working. I would check your code in the function.php file character by character.


    Need help with customization or troubleshooting? Reach out to me.

    May 5, 2013 at 10:22 am #39383
    AnitaC
    Keymaster

    Are you using any other plugins... maybe the Featured Widget Amplified?


    Need help with customization or troubleshooting? Reach out to me.

    May 5, 2013 at 10:26 am #39384
    kay9
    Participant

    I am using plugins, yep, but not that one. I'll try checking the function.php code but I'm not much of a php person. Gah!

    May 5, 2013 at 10:29 am #39386
    kay9
    Participant

    This is at the end of my functions.php file:

    `/** Add the welcome text section */
    add_action( 'genesis_before_content_sidebar_wrap', 'custom_welcome_text' );
    function custom_welcome_text() {
    genesis_widget_area( 'welcome-text', array(
    'before' => '',
    ) );
    }`

    May 5, 2013 at 10:36 am #39387
    Brad Dalton
    Participant

    The code is wrong. It should be:

    /** Add the welcome text section */
    add_action( 'genesis_before_content_sidebar_wrap', 'custom_welcome_text' );
    function custom_welcome_text() {
       genesis_widget_area( 'welcome-text', array(
           'before' => '<div class="welcome-text widget-area">',
       ) );
    }
    

    And make sure you also have the PHP to register the widget.

    /** Register widget areas */
    genesis_register_sidebar( array(
        'id'    => 'welcome-text',
        'name'    => __( 'Welcome Text', 'genesis' ),
        'description'    => __( 'This is the welcome text widget.', 'themename' ),
    ) );
    

    Source http://www.briangardner.com/welcome-text-widget/


    Tutorials for StudioPress Themes.

    May 5, 2013 at 10:38 am #39388
    AnitaC
    Keymaster

    I think the code they provided is right. They didn't use the PHP code like you did.


    Need help with customization or troubleshooting? Reach out to me.

    May 5, 2013 at 10:39 am #39389
    AnitaC
    Keymaster

    I see the widget there, it's just not formatting correctly. Send me an email on my website and I will try to help you offline.


    Need help with customization or troubleshooting? Reach out to me.

    May 5, 2013 at 10:39 am #39390
    kay9
    Participant

    Wow I'm really confused now. I just cut and pasted and saved the code from braddalton and it's still not working. 🙁

    This is what's in there now:

    `/** Register widget areas */
    genesis_register_sidebar( array(
    'id' => 'welcome-text',
    'name' => __( 'Welcome Text', 'genesis' ),
    'description' => __( 'This is the welcome text widget.', 'metro' ),
    ) );

    /** Add the welcome text section */
    add_action( 'genesis_before_content_sidebar_wrap', 'custom_welcome_text' );
    function custom_welcome_text() {
    genesis_widget_area( 'welcome-text', array(
    'before' => '',
    ) );
    }`

    And here is the CSS in there now:

    `/* Welcome Text WIDGET MY CODE THAT I CANNOT GET TO WORK
    ------------------------------------------------------------ */

    .welcome-text {
    border-bottom: double #ddd;
    border-top: double #ddd;
    font-family: 'museo-slab', sans-serif;
    font-size: 30px;
    line-height: 1.0;
    overflow: hidden;
    padding: 25px 0;
    text-align: center;
    }

    .welcome-text p {
    font-size: inherit;
    line-height: 1.0;
    font-family: 'museo-slab', sans-serif;
    margin: 0;
    }

    `

    May 5, 2013 at 10:41 am #39393
    Brad Dalton
    Participant

    The class for the widget is missing meaning the CSS code Brian also provided will not work as it uses that class

    welcome-text 
    

    Here's the CSS using the above class which is generated by the PHP code but missing in Kay's code. This is the reason the CSS isn't working.

     .welcome-text {
        border-bottom: double #ddd;
        border-top: double #ddd;
        font-family: 'Lora', serif;
        font-size: 30px;
        line-height: 1.0;
        overflow: hidden;
        padding: 25px 0;
        text-align: center;
    }
    
    .welcome-text p {
        font-size: inherit;
        line-height: 1.0;
        margin: 0;
    }
    

    Tutorials for StudioPress Themes.

    May 5, 2013 at 10:42 am #39394
    AnitaC
    Keymaster

    Send me an email on my website and I will look at your code from here.


    Need help with customization or troubleshooting? Reach out to me.

    May 5, 2013 at 10:44 am #39395
    Brad Dalton
    Participant

    @Kay9

    You are still missing part of the code.

    That is not the code I pasted as it is missing the new class which the PHP code generates.

    You are missing this:

    <div class="welcome-text widget-area">
    

    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 20 posts - 1 through 20 (of 29 total)
1 2 →
  • The topic ‘Metro theme: adding "Welcome Text" widget per B Gardner's code – help?’ 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