• 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

Can I create a Home Widget that sits underneath the logo on home page only?

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 › Can I create a Home Widget that sits underneath the logo on home page only?

This topic is: resolved

Tagged: home widget

  • This topic has 4 replies, 2 voices, and was last updated 13 years, 4 months ago by zmel.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • April 9, 2013 at 9:56 pm #34448
    zmel
    Member

    I have a customized, widgeted front page at this dev site: http://dev3.dizzysushi.com/

    I'd like to have the fish image, (currently the first text box with html in home bottom #3, executive theme), continue to be a widget, but be located up, and behind the current logo. It can only show on the home page, so the right-header widget area won't work, (and it sits in front of logo).

    I tried making a negative top margin, in the CSS without luck. Any suggestions? Thanks!

    April 10, 2013 at 9:17 am #34536
    vajrasar
    Member

    Give this to your fish widget (in css)

        position: absolute;
        top: 12px;
        z-index: 9999;

    and this in

    #title-area {

        position: absolute;
        z-index: 99999;

    }

    That may solve one part of your problem.


    I make WordPress websites using Genesis Framework.

    WordPress/Genesis Development | Customizations

    April 10, 2013 at 9:44 am #34548
    zmel
    Member

    Thank you, Vajrasar! That worked great. I added some margin-left and it put it just where I want.

    You made my day :0)

    April 10, 2013 at 10:56 am #34575
    vajrasar
    Member

    Am really glad it worked. Now, for the first part of your problem as you said you have made a custom widgetized template and want to show that fish widget only on front page then you can wrap the code producing that fish widget inside is_front_page() if-else loop.

    like -

    if (is_front_page()) {
    //do widget code
    }

    I think this may help you.

    Else if you are using Appereance -> widget to place code using a text widget then you can

    1) enable php in widgets by putting this code in functions.php

    add_filter('widget_text','execute_php',100);
    function execute_php($html){
    if(strpos($html,"<"."?php")!==false){ ob_start(); eval("?".">".$html);
    $html=ob_get_contents();
    ob_end_clean();
    }
    return $html;
    }

    and then place the code you pasted/wrote in the text widget inside if-else loop as -

    if (is_front_page()) {
    //put fish code/image
    }

    I hope it helps.


    I make WordPress websites using Genesis Framework.

    WordPress/Genesis Development | Customizations

    April 10, 2013 at 5:35 pm #34651
    zmel
    Member

    With the theme I am using, it looks like I can keep the html for the fish widget in the appearances/widget home box without having to change the functions.php; it only shows on home page. But I will keep your info for any future use. Thanks!

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

© 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