Simple Hook Video

Community Forums Forums Design Tips and Tricks Simple Hook Video

This topic is: resolved

This topic contains 12 replies, has 2 voices, and was last updated by  e-Partner 1 year, 7 months ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #13462

    e-Partner
    Participant
    Post count: 20

    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

    #13473

    braddalton
    Participant
    Post count: 9439

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

    You can easily change the conditional tag:

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


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #13476

    e-Partner
    Participant
    Post count: 20

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

    #13482

    braddalton
    Participant
    Post count: 9439

    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).


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #13484

    e-Partner
    Participant
    Post count: 20

    Thanks…although I have tested the locations repeatedly, I’ll give the new code a whirl in your suggested location and let you know. :-)

    #13490

    e-Partner
    Participant
    Post count: 20

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

     

    #13491

    e-Partner
    Participant
    Post count: 20

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

    #13496

    braddalton
    Participant
    Post count: 9439

    What theme are you using?


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #13498

    e-Partner
    Participant
    Post count: 20

    Platinum Child Theme running on the Genesis Framework.

    #13500

    e-Partner
    Participant
    Post count: 20

    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.

    #13607

    braddalton
    Participant
    Post count: 9439

    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.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #14035

    e-Partner
    Participant
    Post count: 20

    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!

    #14039

    e-Partner
    Participant
    Post count: 20

    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…

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.