Bin gerade dabei mir ein WP-Thema selbst zu gestalten und stehe vor dem Problem, dass ich zwar einen Teil fertig habe, aber mir nichts angezeigt wird, die Seite ist einfach weiß.
Mit einem Link kann ich leider nicht dienen, da ich das Thema lokal auf einem Server laufen lasse.
Als Tipp: Bis ich sidebar.php mit Inhalt gefüllt habe, habe ich was gesehen.
index.php
PHP
<div id="wrapper">
<?php get_header(); ?>
<div id="main">
<div id="sidebar">
<?php get_sidebar(); ?>
</div>
<div id="content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="BLA zu <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="date">
<?php the_time('d. F Y'); ?>
</div>
<div class="entry">
<?php the_content('(weiterlesen...)'); ?>
</div>
<div class="info">
Abgelegt unter: <?php the_category(', '); ?> - <?php comments_popup_link('0 Kommentare', '1 Kommentar', '(%) Kommentare'); ?>
</div>
</div>
<?php comments_template(); ?>
<?php endwhile; else: ?>
<div class="post">
Sorry, die Seite wurde nicht gefunden!
</div>
<?php endif; ?>
<div class="pagenavi">
<?php if (function_exists('wp_pagebar')) {wp_pagebar(array('before'=>'', 'tooltip_text'=>'Seite', 'next'=>'»', 'prev'=>'«'));}
else { ?>
<?php posts_nav_link(' - ', _('Zurück'), _('Weiter')); ?>
<?php } ?>
</div>
</div>
<div id="main-clear">
</div>
</div>
<?php get_footer(); ?>
</div>
Alles anzeigen
sidebar.php
PHP
<?php if (is_home()) { ?>
<h2>About this Blog</h2>
<div class="sidebarinfo">
A little something about you, the author. Nothing lengthy, just an overview. Open sidebar.php and change this line.
</div>
<?php } ?>
<?php if (is_single()) { ?>
<h2>About this Entry</h2>
<div class="sidebarinfo">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a> was posted on <nobr><?php the_time('F jS, Y') ?></nobr> at <nobr><?php the_time('g.ia') ?></nobr> and is filed under <?php the_category(', ') ?>. <?php if ('open' == $post->comment_status) : ?> This entry has <?php comments_number('no comments (yet)', 'one comment', '% comments' );?>. You can follow any responses through the <?php comments_rss_link('RSS 2.0 Feed'); ?><?php endif; ?>.</a>
</div>
<?php } ?>
<h2>Last Entries</h2>
<?php $today = current_time('mysql', 1);
if ( $recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' AND post_date_gmt < '$today' ORDER BY post_date DESC LIMIT 10")): ?>
<ul>
<?php foreach ($recentposts as $post)
{ if ($post->post_title == '') $post->post_title = sprintf(__('Post #%s'), $post->ID);
echo "<li><a href='".get_permalink($post->ID)."'>"; the_title(); echo '</a></li>'; } ?>
</ul>
<?php endif; ?>
<li>
<h2>Newest comments</h2>
<ul>
<?php get_recent_comments(); ?>
</ul>
</li>
<?php } ?>
<h2>Categories</h2>
<ul>
<?php wp_list_cats('sort_column=name&hierarchical=0'); ?>
</ul>
<h2>Archive</h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
<h2 class="sidebar-headline">RSS-Feeds</h2>
<ul>
<li><a href="<?php bloginfo('rss2_url'); ?>">RSS 2.0 Entries</a></li>
<li><a href="<?php bloginfo('comments_rss2_url'); ?>">RSS 2.0 Comments</a></li>
</ul>
<?php endif; ?>
<h2>Links</h2>
<ul>
<h3><a href='javascript:hl_openCloseOptions("list1");'>Shops</a></h3>
<ul id="list1" style="display: none; visibility: visible;">
<li><a target="_blank" href="http://www.frontlineshop.com/">Frontlineshop</a></li>
<li><a target="_blank" href="http://www.stylefish.eu/">Stylefish</a></li>
<li><a target="_blank" href="http://www.insidextreme.de/">Inside Extreme</a></li>
<li><a target="_blank" href="http://www.rockon.de/">RockOn</a></li>
<li><a target="_blank" href="http://shop.mantisshop.de/">Mantisshop</a></li>
<li><a target="_blank" href="http://shop.stylefile.de/">Stylefile</a></li>
<li><a target="_blank" href="http://www.sonnensachen.de/">Sonnensachen</a></li>
<li><a target="_blank" href="http://www.result24.com/">Result</a></li>
<li><a target="_blank" href="http://www.blue-tomato.com/de/welcome.bto">Blue Tomato</a></li>
<li><a target="_blank" href="http://www.skatedeluxe.de/">SkateDeluxe</a></li>
<li><a target="_blank" href="http://www.s-port-five.com/">S Port Five</a></li>
<li><a target="_blank" href="http://www.kolibrishop.com/">Kolibri</a></li>
<li><a target="_blank" href="http://www.cocaines.de/">Cocains</a></li>
<li><a target="_blank" href="http://www.wh1shop.de/wh1shop/index.php">Warehouse One</a></li>
<li><a target="_blank" href="http://www.snowlab.de/">Snowlab</a></li>
<li><a target="_blank" href="http://www.powderforce.com/">Powder Force</a></li>
<li><a target="_blank" href="http://www.planet-sports.de/">Planet-Sports</a></li>
</ul>
</ul>
<ul>
<h3><a href='javascript:hl_openCloseOptions("list2");'>Musik</a></h3>
<ul id="list2" style="display: none; visibility: visible;">
<li><a target="_blank" href="http://blog.datasapiens.net/">Data Sapiens</a></li>
<li><a target="_blank" href="http://hypem.com/">Hype Machine</a></li>
<li><a target="_blank" href="http://lastfm.de/">LastFM</a></li>
</ul>
</ul>
Alles anzeigen
style.css
Code
/*
Template Informations
*/
* {
margin: 0px;
padding: 0px;
}
body {
background-color: #FFFFFF;
font-family: Arial, Verdana, Sans-Serif;
font-size: 10px;
color: #222222;
}
#wrapper {
width: 900px;
height: auto;
margin: 0px auto;
}
#header {
width: 900px;
height: 250px;
}
#navi {
width: 900px;
height: auto;
}
#navi-left {
width: 450px;
height: auto;
float: left;
text-align: left;
}
#navi-right {
width: 450px;
height: auto;
float: left;
text-align: right;
}
#navi-clear {
clear: both;
}
#main {
width: 900px;
height: auto;
}
#sidebar {
width: 150px;
height: auto;
float: left;
text-align: right;
}
#content {
width: 750px;
height: auto;
float: left;
text-align: justify;
}
.post {
width: auto;
height: auto;
}
.post h2 {
font-size: 24px;
border-bottom: 1px groove;
display: block;
margin-bottom: 15px;
}
.post h2 a:link, .post h2 a:visited, .post h2 a:active, .post h2 a:hover {
text-decoration: none;
color: #222222;
}
.post .date {
width: auto;
height: auto;
margin-bottom: 35px;
}
.post .entry {
width: auto;
height: auto;
margin-bottom: 15px;
}
.post .entry a:link, .post .entry a:visited, .post .entry a:active, .post .entry a:hover {
text-decoration: none;
color: #666666;
}
.post .info {
width: auto;
height: auto;
margin-bottom: 15px;
}
.post .info a:link, .post .info a:visited, .post .info a:active, .post .info a:hover {
text-decoration: none;
color: #666666;
}
#main-clear {
clear: both;
}
#footer {
width: 900px;
height: auto;
}
#footer-left {
width: 450px;
height: auto;
float: left;
text-align: left;
}
#footer-right {
width: 450px;
height: auto;
float: left;
text-align: right;
}
#footer-clear {
clear: both;
}
Alles anzeigen
Hoffentlich kann mir jemand helfen!
Gruß