Video on home page Agency Pro

Community Forums Forums Design Tips and Tricks Video on home page Agency Pro

This topic is: not resolved

This topic contains 3 replies, has 4 voices, and was last updated by  TravisPri 11 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #70924

    tornado
    Participant
    Post count: 29

    Hi folks!

    I want to put a little video on the home page of the Agency Pro theme. If you look at the current theme demo, I probably want to put it above the ‘Our Work’ button.

    How would you do this?

    I’ll be using Wistia so their embed options are oEmbed, iframe or API.

    Cheers.

    G

    #70929

    nutsandbolts
    Moderator
    Post count: 3173

    Are you using the Wistia plugin? If so, you should be able to paste the embed code into a text widget, depending on what kind of embed code it gives you. If it’s PHP or a shortcode, I can give you a function to add to your theme files that will allow you to use either one in a widget.


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #70989

    Liz
    Participant
    Post count: 41

    Andrea, would this function work for YouTube or Vimeo embedded video too? If so, I’d like to see it.

    #71012

    TravisPri
    Participant
    Post count: 29

    Hi Liz,

    I’m not Andrea, but I’m pretty sure this is the code she is referring to. Add them to your functions.php and you will be able to use php and shortcodes in widget areas :)

    // Enable shortcodes in widgets
    add_filter('widget_text', 'do_shortcode');
    // Enable PHP in widgets
    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;
    }
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.