New Topic

Video Instead of Slider?

Home › Forum › Customization › Video Instead of Slider?

Tagged: , ,

Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #678
    StartupWP
    Keymaster

    You’ll need to setup a child theme:

    https://startupwp.com/topic/child-theming/

    And copy over header.php from the main theme.

    Find this line:

    <?php if ( $options['slider'] ){ echo '<div id="slider">'.do_shortcode('[nivoslider slug="slider"]').'</div>'; } ?>

    And replace with:

    <?php if ( is_home() ) {echo 'YOUR VIDEO CODE HERE';} ?>

    #682
    razcal
    Participant

    o.k.  I did exactly as you said and nothing shows up.  I thought html5 can play native video?  Code below.  Please advise.

    <?php if ( is_home() ) {echo ‘<video poster=”/wp-content/uploads/2013/video/brian-battaglia_home-poster.jpg” width=”1000″ height=”480″ autoplay loop>

    <source src=”/wp-content/uploads/2013/video/brian-battaglia_home-MP4.mp4″ type=”video/mp4″>

    <source src=”/wp-content/uploads/2013/video/brian-battaglia_home-OGV.ogv” type=”video/ogg”>

    <object type=”application/x-shockwave-flash” data=”/wp-content/uploads/2013/video/brian-battaglia_home-player.swf” width=”1000″ height=”480″>

    <param name=”autoplay” value=”true”>

    <param name=”allowfullscreen” value=”false”>

    <param name=”allowscriptaccess” value=”always”>

    <param name=”flashvars” value=”/wp-content/uploads/2013/video/brian-battaglia_home-FLV.flv”>

    <!–[if IE]><!–><param name=”movie” value=”m/player.swf”><!–<![endif]–>

    <img src=”/wp-content/uploads/2013/video/brian-battaglia_home-poster.jpg” width=”1000″ height=”480″ alt=”Video”>

    </object>

    </video>’;} ?>

    Am I missing something?  Is this completely wrong?  Do I need a player?  Can you recommend one?  Huge thanks!

    #684
    StartupWP
    Keymaster

    Leave the code active and provide the link to your website please and we’ll have a look.

    #685
    razcal
    Participant

    http://brianbattaglialaw.com/

    I also added the attributes autoplay=”autoplay”  and loop=”loop” to the aforementioned header.php  but it did not help.

    Thanks.

    #686
    StartupWP
    Keymaster

    Try this method instead:

    <?php if (is_home()) { ?>
    WHATEVER YOU WANT HERE
    <?php } ?>

    Quick tip, before trying it with the video code, just try plain text “abc” or “123” for example just to make sure that it appears.

    If it does, but then the video code doesn’t work you’ll have pinpointed that something is wrong with the video embed code. It is also recommend to use the full URL paths instead of relative ones as you’re using when it comes to WordPress.

    If you’re still having issues with your video code, a great error checking tool for HTML can be found here:

    http://validator.w3.org/#validate_by_input

    #687
    razcal
    Participant

    Thanks again, but that did not work.  I put the exact syntax in with the word TEST.  It does not display.

    I am wondering if it needs a container between the nav and page/post?  The slider has a div id and closes.  What do you think?  If so would we add that to the child css?

    #688
    razcal
    Participant

    also looking at this player plugin.  http://wordpress.org/extend/plugins/videojs-html5-video-player-for-wordpress/installation/  but again how would we get it placed where the slider normally would go.  I would still like the left content/right sidebar page below the video.

    #697
    StartupWP
    Keymaster

    Just tested and it works fine. Not a container issue, it will reside safely and symmetrically in the #wrapper div.

    Possibly an issue with the implementation of the child theme?

    #700
    razcal
    Participant

    Do you mean the sample text displayed on your test?  Also, did you test within a child theme or in a native theme environment?  I will look at in a bit an report back.  Thanks.

    #702
    StartupWP
    Keymaster

    Let’s do this, share exactly what you have in your child theme stylesheet in a reply. It may be easier to use http://pastebin.com/.

    Otherwise, we’ll be here if you need more help after working on it some more.

    #703
    razcal
    Participant
    #704
    StartupWP
    Keymaster

    All looks good. May we email you directly to get the login details and have a look at your live setup?

    #705
    razcal
    Participant

    Yes, please. I am just about to give up, as I was also having trouble adding the mediatype for ogv in my htaccess. video shouldn’t be this hard :) I know it’s coming natively in WPv3.6. Thanks.

    #706
    StartupWP
    Keymaster

    Email sent.

    #716
    StartupWP
    Keymaster

    Okay, we’ve found the issue. Apparently this may be a WordPress bug where sometimes is_home just will not recognize the homepage correctly, likely after adjusting Settings > Reading.

    A workaround is:

    <?php if (is_page('home')) { ?>
    WHATEVER YOU WANT HERE
    <?php } ?>

    Make sure to update your original child theme and update via FTP.

    #717
    razcal
    Participant

    I have to reinstall the child theme? or do you mean update the header.php both in the theme and then ALSO reupload the updated header.php thru ftp? Please be clear. ^^That is a bit terse.

    Also now my body background is nerfed. It will not load a background image or color? Please advise.

    Thanks.

    #718
    StartupWP
    Keymaster

    None of this makes any sense, very bizarre. What we recommend doing is contacting your host and request that they do a restoration of your account to the most recent backup date they have for you.

    #735
    razcal
    Participant

    Thank you so much! You are very patient, and I really appreciate it. I got it working now, after a clean reinstall of both themes!

    #737
    StartupWP
    Keymaster

    Good to hear. :)

Viewing 19 posts - 1 through 19 (of 19 total)
  • You must be logged in to reply to this topic.