Hm ich habe diese Code hier gefunden:http://forum.wordpress-deutschland.org/design/3767-go….html#post20143
[LEFT] [COLOR=#000000] [COLOR=#0000cc]<?php $postnum [/COLOR][COLOR=#006600]= [/COLOR][COLOR=#0000cc]1[/COLOR][COLOR=#006600]; [/COLOR][COLOR=#0000cc]$showads [/COLOR][COLOR=#006600]= [/COLOR][COLOR=#0000cc]1[/COLOR][COLOR=#006600]; [/COLOR][COLOR=#ff9900]// Start AdHack [/COLOR][COLOR=#0000cc]?>
<?php [/COLOR][COLOR=#006600]if ([/COLOR][COLOR=#0000cc]have_posts[/COLOR][COLOR=#006600]()) : [/COLOR][COLOR=#0000cc]?>
[/COLOR]
...hier steht der Beitragscode...
[COLOR=#0000cc]<?php [/COLOR][COLOR=#006600]if ([/COLOR][COLOR=#0000cc]$postnum [/COLOR][COLOR=#006600]== [/COLOR][COLOR=#0000cc]$showads[/COLOR][COLOR=#006600]) { [/COLOR][COLOR=#0000cc]?>
[/COLOR] Dein Ad-Code
[COLOR=#0000cc]<?php [/COLOR][COLOR=#006600]} [/COLOR][COLOR=#0000cc]$postnum[/COLOR][COLOR=#006600]++; [/COLOR][COLOR=#ff9900]// End Ad Hack [/COLOR][COLOR=#0000cc]?>
<?php [/COLOR][COLOR=#006600]endwhile; [/COLOR][COLOR=#0000cc]?>[/COLOR] [/COLOR] [/LEFT]
Ich hab das mal ausprobiert, aber dann kommt immer Fehler auf Zeile 26!!!
Hier ist meine Index.php datei:
<?php
get_header();
?>
<img alt="" src="news.png" width="456" height="32" />
<div class="main-box-body"><?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="post<?php the_ID(); ?>"><div class="post-title">• <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>
<div class="post-status">Posted by <b><?php the_author() ?></b> am <?php global $post; echo mysql2date(get_option('date_format'), $post->post_date); ?>| Kategorie: <?php the_category(',') ?> • <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?></div>
<div class="story"><?php the_content(__('(more...)')); ?> <br><center><div style="margin-top: 10px;"><b>Bitte Vote uns zur Site of the Year</b><br/><a target="_blank" href="http://www.brittanysnow.de/Siteoftheyear.php">
<img alt="" src="http://brittanysnow.de/img/V4M1.gif" width="100" height="35" class="no_border" /></a>
<a target="_blank" href="http://www.brittanysnow.de/Siteoftheyear.php">
<img alt="" src="http://brittanysnow.de/img/V4M1.gif" width="100" height="35" class="no_border" /></a>
<a target="_blank" href="http://www.brittanysnow.de/Siteoftheyear.php">
<img alt="" src="http://brittanysnow.de/img/V4M1.gif" width="100" height="35" class="no_border" /></a></div></center>
</div></div>
<!--start-->
<?php comments_template(); // Get wp-comments.php template ?>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<table style="weidth: 100%" align="center"><tr><td align="center">
<center><?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?></center></td></tr></table>
</div></div></div>
<?php get_footer(); ?>
</div></div></div>
Alles anzeigen
Ich möchte ja keine Adsens rein machen sondern nur das:
<br><center><div style="margin-top: 10px;"><b>Bitte Vote uns zur Site of the Year</b><br/><a target="_blank" href="http://www.brittanysnow.de/Siteoftheyear.php">
<img alt="" src="http://brittanysnow.de/img/V4M1.gif" width="100" height="35" class="no_border" /></a>
<a target="_blank" href="http://www.brittanysnow.de/Siteoftheyear.php">
<img alt="" src="http://brittanysnow.de/img/V4M1.gif" width="100" height="35" class="no_border" /></a>
<a target="_blank" href="http://www.brittanysnow.de/Siteoftheyear.php">
<img alt="" src="http://brittanysnow.de/img/V4M1.gif" width="100" height="35" class="no_border" /></a></div></center>
Aber irgendwie geht das nicht =(