Jeg kan ikke få min video til at blive vist andre steder end toppen af indlægget, og så kommer min sidebar til at blive virkelig rodet!
Dette er min kode i single.php:
START
<?php get_header(); ?>
<?php if( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php $layout = (themify_get('layout') != "default" && themify_check('layout')) ? themify_get('layout') : themify_get('setting-default_page_post_layout'); /* set default layout */ if($layout == ''): $layout = 'sidebar2'; endif; ?>
<?php
/////////////////////////////////////////////
// Set Default Image Sizes
/////////////////////////////////////////////
$content_width = 978;
$sidebar1_content_width = 642;
$sidebar2_content_width = 474;
// Post View Image Settings
$single_image_width = 968;
$single_image_height = 400;
?>
<!-- layout-container -->
<div id="layout" class="clearfix <?php echo $layout; ?>">
<?php if($layout == "sidebar2"): ?>
<!-- sidebar-narrow -->
<?php get_template_part( 'includes/sidebar-narrow'); ?>
<!-- /sidebar-narrow -->
<?php endif; ?>
<!-- content -->
<div id="content" class="list-post">
<?php global $hide_date, $hide_meta, $hide_image, $hide_title; ?>
<?php $hide_title = (themify_get('hide_post_title') != "default" && themify_check('hide_post_title')) ? themify_get('hide_post_title') : themify_get('setting-default_page_post_title'); ?>
<?php $unlink_title = (themify_get('unlink_post_title') != "default" && themify_check('unlink_post_title')) ? themify_get('unlink_post_title') : themify_get('setting-default_page_unlink_post_title'); ?>
<?php $hide_date = (themify_get('hide_post_date') != "default" && themify_check('hide_post_date')) ? themify_get('hide_post_date') : themify_get('setting-default_page_post_date'); ?>
<?php $hide_meta = (themify_get('hide_post_meta') != "default" && themify_check('hide_post_meta')) ? themify_get('hide_post_meta') : themify_get('setting-default_page_post_meta'); ?>
<?php $hide_image = (themify_get('hide_post_image') != "default" && themify_check('hide_post_image')) ? themify_get('hide_post_image') : themify_get('setting-default_page_post_image'); ?>
<?php $unlink_image = (themify_get('unlink_post_image') != "default" && themify_check('unlink_post_image')) ? themify_get('unlink_post_image') : themify_get('setting-default_page_unlink_post_image'); ?>
<?php $post_image_width = themify_get('image_width'); ?>
<?php $post_image_height = themify_get('image_height'); ?>
<?php
///////////////////////////////////////////
// Setting image width, height
///////////////////////////////////////////
global $width, $height;
if($post_image_height == "" && $post_image_width == ""):
$width = $single_image_width;
$height = $single_image_height;
if($layout == "sidebar1" || $layout == "sidebar1 sidebar-left"):
$ratio = $width / $content_width;
$aspect = $height / $width;
$width = round($ratio * $sidebar1_content_width);
if($height != '' && $height != 0):
$height = round($width * $aspect);
endif;
elseif($layout == "sidebar2"):
$ratio = $width / $content_width;
$aspect = $height / $width;
$width = round($ratio * $sidebar2_content_width);
if($height != '' && $height != 0):
$height = round($width * $aspect);
endif;
endif;
else:
$width = $post_image_width;
$height = $post_image_height;
endif;
?>
<?php get_template_part( 'includes/loop'); ?>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
<?php // Author Box
if(themify_check('setting-post_author_box')): ?>
<div class="shortcode clearfix author-box">
<p class="author-avatar">
<?php echo get_avatar( get_the_author_meta('user_email'), $avatar_size, '' ); ?>
</p>
<div class="author-bio">
<h4 class="author-name">
<?php // Check for user url exists or not
if(get_the_author_meta('user_url')){ ?>
<a href="<?php echo get_the_author_meta('user_url'); ?>"><?php echo get_the_author_meta('first_name').' '.get_the_author_meta('last_name'); ?></a>
<?php } else { ?>
<?php echo get_the_author_meta('first_name').' '.get_the_author_meta('last_name'); ?>
<?php } ?>
</h4>
<?php echo get_the_author_meta('description'); ?>
<?php // Check for user url exists or not
if(get_the_author_meta('user_url')){ ?>
<p class="author-link">
<a href="<?php echo get_the_author_meta('user_url'); ?>">→ <?php echo get_the_author_meta('user_firstname').' '.get_the_author_meta('user_lastname'); ?> </a>
</p>
<?php } ?>
</div> <!-- / author-bio -->
</div> <!-- / author-box -->
<?php endif; // End of themify_check('setting-post_author_box')) ?>
<?php get_template_part( 'includes/post-nav'); ?>
<!-- comments -->
<?php if(!themify_check('setting-comments_posts')): ?>
<?php comments_template(); ?>
<?php endif; ?>
<!-- /comments -->
</div>
<!--/content -->
<?php endwhile; ?>
<?php
/////////////////////////////////////////////
// Sidebar
/////////////////////////////////////////////
?>
<?php if ($layout != "sidebar-none"): get_sidebar(); endif; ?>
</div>
<!-- layout-container -->
<?php get_footer(); ?>
SLUT
Og dette script skal jeg sætte ind:
<div id="gv_target_9425434913312833871358242"></div>
<script>!function(d, s, id) {
var js, pjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "http://player-services.video-loader.com/embed-code/index/find?placementVersionId=9425434913312833871358242";
pjs.parentNode.insertBefore(js, pjs);
}(document, 'script', 'gv_script_9425434913312833871358242' Scriptet er en video