• 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

Simple Hook Video

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 › Simple Hook Video

This topic is: resolved

Tagged: Simple Hooks, video

  • This topic has 12 replies, 2 voices, and was last updated 12 years, 5 months ago by e-Partner.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • January 21, 2013 at 8:17 am #13462
    e-Partner
    Member

    At http://www.Frontier-Village.com I would like to use Simple Hooks to insert a YouTube video <iframe> on the Index Page just below the slide show and above the posts; the slide show is showing Starbucks, Ross, Target, etc. Is there a way to do this suing Simple Hooks? I cannot seem to get the video into this location. All input requested and deeply appreciated.

    This is where I want the video:

    http://www.frontier-village.com/wp-content/uploads/2013/01/YouTube-Simple-Hook-Location.jpg

    January 21, 2013 at 9:32 am #13473
    Brad Dalton
    Participant

    Try this in the location you want to display the video using Simple Hooks:

    You can easily change the conditional tag:

    <?php if (is_home() ) { ?>
    <div><iframe> youtube video embed code</iframe></div>
    <?php } ?>
    

    Tutorials for StudioPress Themes.

    January 21, 2013 at 9:53 am #13476
    e-Partner
    Member

    Where is that nice solution going to be inserted in the Simple Hooks framework?

    January 21, 2013 at 10:24 am #13482
    Brad Dalton
    Participant

    You'll need to test it to see where it outputs.

    Try here.

    genesis_before_content Hook

    This hook executes immediately before the content column (outside the #content div).


    Tutorials for StudioPress Themes.

    January 21, 2013 at 10:30 am #13484
    e-Partner
    Member

    Thanks...although I have tested the locations repeatedly, I'll give the new code a whirl in your suggested location and let you know. 🙂

    January 21, 2013 at 10:39 am #13490
    e-Partner
    Member

    Here is where the view of the video in the genesis_before_content Hook location. http://www.Frontier-Villge.com.

     

    January 21, 2013 at 10:41 am #13491
    e-Partner
    Member

    I have also inserted the code into the genesis_before_content Hook, which logically sends it to the bottom.

    January 21, 2013 at 11:03 am #13496
    Brad Dalton
    Participant

    What theme are you using?


    Tutorials for StudioPress Themes.

    January 21, 2013 at 11:08 am #13498
    e-Partner
    Member

    Platinum Child Theme running on the Genesis Framework.

    January 21, 2013 at 11:10 am #13500
    e-Partner
    Member

    Just removed the YouTube <iframe> from the top and you will see I have left it at the bottom until I figure this monster out.  I might have to hard core it into the Editor, but don't really like to do that.

    January 21, 2013 at 6:12 pm #13607
    Brad Dalton
    Participant

    When i tested this, it worked. You have alot of things going on your homepage. You could use a static page as your homepage and do that yes.


    Tutorials for StudioPress Themes.

    January 23, 2013 at 7:04 am #14035
    e-Partner
    Member

    Just so I am clear, when you tested the following in the "genesis_before_content Hook", with the YouTube <iframe> inserted, you found it successful?

    <?php if (is_home() ) { ?>
    <div><iframe> youtube video embed code</iframe></div>
    <?php } ?>

    Also are you checking the boxes below the code that reference the pHp and Hook generation?

    Thanks!

    January 23, 2013 at 7:12 am #14039
    e-Partner
    Member

    Tried it again and no go...the insertion of the video appears above the Digital Content Gallery slideshow.

    Here's my insertion:

    <?php if (is_home() ) { ?><div><iframe width="599" height="337" src="http://www.youtube.com/embed/HPrHdngEpRw?rel=0" frameborder="0" allowfullscreen></iframe></div><?php } ?>

    Puzzling...

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

© 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