• 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

showing only on one page

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 › showing only on one page

This topic is: not resolved
  • This topic has 3 replies, 3 voices, and was last updated 8 years ago by ᴅᴀᴠɪᴅ.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • February 21, 2018 at 4:30 pm #216879
    stefanofalcini69
    Participant

    Hi, I'm using mimimum pro on local server. I've put a div on my homepage (marquee effect) using a hook and a rule in css style. As a result, the div is visible on all the pages while I'd like it appearing on homepage only. I've tried using the home page-id before the css selector but it doesn't work. Can someone help me?
    thanks

    stefano

    February 21, 2018 at 4:41 pm #216882
    Victor Font
    Moderator

    Which hook? Why not a widget? Please post a link to the site.


    Regards,

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

    February 21, 2018 at 5:10 pm #216884
    stefanofalcini69
    Participant

    a genesis_after_header hook. I can't post a link as I'm working on local

    February 21, 2018 at 5:29 pm #216885
    ᴅᴀᴠɪᴅ
    Member

    Assuming you've added this to your functions.php, you need to wrap it in a conditional tag to make sure it only happens on your home page. something like this...

    add_action( 'genesis_after_header', 'your_function_name' );
    function your_function_name() {
        
          if ( is_front_page() ) {
               // Your marquee stuff here.
          }
        
    }

    OR move the code to front-page.php if there is one, instead of functions.php, so it only runs on the front page.


    I love helping creative entrepreneurs build epic things with WP & Genesis.

    Follow on Twitter

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