Inserir vídeo no template pronto
-
Boa Tarde…
Estou utilizando o tema Duena no meu site. Eu queria colocar um vídeo acima do slide dos posts.
Consegui com o este código:
<div style=”text-align: center; margin: auto”>
<object type=”application/x-shockwave-flash” style=”width:853px; height:480px;” loop=”true” data=”https://www.youtube.com/v/RYowuKjPl90?version=3&autoplay=1&loop=1&playlist=RYowuKjPl90″>
<param name=”movie” value=”https://www.youtube.com/v/RYowuKjPl90?version=3&autoplay=1&loop=1&playlist=RYowuKjPl90″ />
<param name=”allowFullScreen” value=”true” />
<param name=”loop” value=”true”>
<param name=”allowscriptaccess” value=”always” />
</object>
</div>Eu inseri ele no index e ficou assim:
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package duena
*/get_header(); ?>
<div style=”text-align: center; margin: auto”>
<object type=”application/x-shockwave-flash” style=”width:1140px; height:440px;” loop=”true” data=”https://www.youtube.com/v/RYowuKjPl90?version=3&autoplay=1&loop=1&playlist=RYowuKjPl90″>
<param name=”movie” value=”https://www.youtube.com/v/RYowuKjPl90?version=3&autoplay=1&loop=1&playlist=RYowuKjPl90″ />
<param name=”allowFullScreen” value=”true” />
<param name=”loop” value=”true”>
<param name=”allowscriptaccess” value=”always” />
</object>
</div><div id=”primary” class=”col-md-8 <?php echo esc_attr( of_get_option(‘blog_sidebar_pos’) ) ?>”>
<div id=”content” class=”site-content” role=”main”><?php if (have_posts()) : while (have_posts()) : the_post();
// The following determines what the post format is and shows the correct file accordingly
$format = get_post_format();
get_template_part( ‘post-formats/’.$format );if($format == ”)
get_template_part( ‘post-formats/standard’ );endwhile;
get_template_part(‘post-formats/post-nav’);
else: ?>
<div class=”no-results”>
<p><?php _e( ‘It seems we can’t find what you’re looking for. Perhaps searching can help.’, ‘duena’ ); ?></p>
<?php get_search_form(); /* outputs the default WordPress search form */ ?>
</div><!–no-results–><?php endif; ?>
</div><!– #content –>
</div><!– #primary –><?php get_sidebar(); ?>
<?php get_footer(); ?>Só que ele aparece abaixo dos slides a única forma que consegui colocá-lo acima foi inserindo no header…. Só que aparece em todas as páginas e eu gostaria que ficasse somente na home…..
Alguma dica???? Obrigado pela atenção!
- O tópico ‘Inserir vídeo no template pronto’ está fechado para novas respostas.