Hov. Du er ikke logget ind.
DU SKAL VÆRE LOGGET IND, FOR AT INTERAGERE PÅ DENNE SIDE

Wordpress - reklame i post/indlæg

Side 1 ud af 1 (9 indlæg)
  • 1
Fra Vejen
Tilmeldt 26. Nov 11
Indlæg ialt: 330
Skrevet kl. 10:00
Hvor mange stjerner giver du? :

Hej alle,

Er der nogen af jer der ved hvilken kode jeg skal indsætte i hvilken kode for at der automatisk bliver vist en bestemt reklame (som f.eks. den video jeg har tænkt mig) i mine indlæg?

På forhånd tak for hjælpen :-) 

Find de bedste apps her!

Fra Aalborg
Tilmeldt 17. Nov 09
Indlæg ialt: 770
Fra  HLnet Skrevet kl. 10:07
Hvor mange stjerner giver du? :

 iPhone 6

Fra Vejen
Tilmeldt 26. Nov 11
Indlæg ialt: 330
Skrevet kl. 10:09
Hvor mange stjerner giver du? :

Kan du sige mere præcist, og hvad for en kode, jeg skal indsætte i Single.php?

Tak for svaret!

Find de bedste apps her!

Fra København
Tilmeldt 24. Jan 12
Indlæg ialt: 385
Skrevet kl. 10:11
Hvor mange stjerner giver du? :

Halfdan Harring:

Kan du sige mere præcist, og hvad for en kode, jeg skal indsætte i Single.php?

Tak for svaret!

Du kan indsætte dit link, fx embedded youtube video der hvor du vil have videoen.

For hver post vil videoen så komme frem. Du kan gøre det samme med tekst, billeder osv.

:: HDMI kabel ::

Fra Vejen
Tilmeldt 26. Nov 11
Indlæg ialt: 330
Skrevet kl. 10:15
Hvor mange stjerner giver du? :

Jeg kan vel ikke bare smide et script ind hvor som helst i single.php? :)

Find de bedste apps her!

Fra Århus C
Tilmeldt 17. May 11
Indlæg ialt: 390
Fra  RejseGear Skrevet kl. 10:23
Hvor mange stjerner giver du? :

Halfdan Harring:

Jeg kan vel ikke bare smide et script ind hvor som helst i single.php? :)

Hvorfor ikke?

Hvis du vil have det i posten, så smider det efter post.content, og hvis du vil have det efter posten, så er det efter post.container 

Koden går jo ikke i stykker af, at du retter lidt i det :) 

Jeg sælger også lidt kufferter og rejseudstyr hos RejseGear.dk

Fra København
Tilmeldt 24. Jan 12
Indlæg ialt: 385
Skrevet kl. 10:24
Hvor mange stjerner giver du? :

Halfdan Harring:

Jeg kan vel ikke bare smide et script ind hvor som helst i single.php? :)

Ja undskyld, i single.php kan du kun ligge koden ind mellem header og post eller post og footer. Det andet ved jeg ikke lige.

:: HDMI kabel ::

Fra Vejen
Tilmeldt 26. Nov 11
Indlæg ialt: 330
Skrevet kl. 10:35
Hvor mange stjerner giver du? :

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'); ?>">&rarr; <?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

 

Find de bedste apps her!

Fra Vejen
Tilmeldt 26. Nov 11
Indlæg ialt: 330
Skrevet kl. 10:49
Hvor mange stjerner giver du? :

Jeg har fundet ud af det nu, men jeg vil gerne have videoen til at ligge INDE i indlægget, hvad gør jeg? :)

Find de bedste apps her!

Side 1 ud af 1 (9 indlæg)