Guten Morgen,
ich versuche gerade bei dem Arthemia-Theme (Arthemia: Wordpress Magazine Theme Released - Jubel and The Unessential) die oberen beiden Bereiche (Headline & Featured) auch in den pages.php auftauchen zu lassen.
Allerdings bin ich (wie hier wahrscheinlich schon jeder weiss ) ein echter PHP-DAU :oops:
Was hab ich getan?
1: index.php als page.php abgespeichert.
Ziel erreicht aber natürlich werden auch die aktuellsten Beiträge als the_excerpt angezeigt.
Will ich nicht!
2: Habe versucht die Abschnitte aus der index.php von denen ich glaubte das sie verantwortlich sind für den Aufruf von Headline / featured in die page.php einzubauen.
Da ich aber mit der Syntax von PHP auf Kriegsfuss stehe hab ich stundenlang nur die Site zerschossen.
Kann mir mal jemand einen Lösungsansatz aufzeigen?
Ich poste mal vorsichtshalber die Codes von Index.php & Page.php
Gruss axel
Index.php
<?php get_header(); ?>
<?php if(!is_paged()) { ?>
<div id="top" class="clearfloat">
<div id="headline">
<div class="headfeat">Heute provisionsfrei</div>
<img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/headline.png" width="230px" height="0px" alt="" />
<?php query_posts("showposts=1&category_name=head"); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>
<?php $values = get_post_custom_values("head");?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php
$values = get_post_custom_values("Image"); echo $values[0]; ?>&w=300&h=275&zc=1&q=100"
alt="<?php the_title(); ?>" class="left" width="300px" height="275px" /></a>
<?php the_excerpt(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">Mehr lesen? »</a>
<?php endwhile; ?>
</div>
<div id="featured">
<div class="pingfeat">Bestseller der Woche</div>
<?php query_posts("showposts=4&category_name=feat"); $i = 1; ?>
<?php while (have_posts()) : the_post(); ?>
<div class="clearfloat">
<?php $values = get_post_custom_values("Image");
if (isset($values[0])) { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php
$values = get_post_custom_values("Image"); echo $values[0]; ?>&w=60&h=90&zc=1&q=100"
alt="<?php the_title(); ?>" class="left" width="60px" height="90px" /></a>
<?php } ?>
<div class="info"><a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title(); ?></a>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<div id="middle" class="clearfloat">
<div class="catfeat">Event-Gestaltung</div>
<img height="0px" src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/category.png" class="clearfloat" alt="" />
<?php $display_categories = array(110,108,109,111,112,113); $i = 1;
foreach ($display_categories as $category) { ?>
<div id="cat-<?php echo $i; ?>" class="category">
<?php query_posts("showposts=1&cat=$category")?>
<span class="cat_title"><a href="<?php echo get_category_link($category);?>"><?php single_cat_title(); ?></a></span>
<a href="<?php echo get_category_link($category);?>"><?php echo category_description($category); ?></a>
</div>
<?php $i++; ?>
<?php } ?>
</div>
<?php } ?>
<div id="bottom" class="clearfloat">
<div id="front-list">
<?php
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts("cat=-108,-98,-99,-3&paged=$page&posts_per_page=5"); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="contentboxrechts">
<div class="clearfloat">
<h3 class=cat_title><?php the_category(', '); ?> »</h3>
<div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>
<div class="spoiler">
<?php $values = get_post_custom_values("Image");
if (isset($values[0])) { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php
$values = get_post_custom_values("Image"); echo $values[0]; ?>&w=110&h=110&zc=1&q=100"
alt="<?php the_title(); ?>" class="left" width="110px" height="110px" /></a>
<?php } ?>
<?php the_excerpt(); ?>
</div>
</div>
</div>
<?php endwhile; ?>
<div class="navigation">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
else { ?>
<div class="right"><?php next_posts_link('Nächste Seite »') ?></div>
<div class="left"><?php previous_posts_link('« Vorherige Seite') ?></div>
<?php } ?>
</div>
</div>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>
Alles anzeigen
Page.php
<?php get_header(); ?>
<div id="content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post_<?php the_ID(); ?>">
<span class="breadcrumbs">Sie befinden sich hier: <?php
if(function_exists('bcn_display'))
{
bcn_display();
}
?></span>
<?php if (is_front_page()){
echo '<h2>Künstleragentur & Event-Management</h2>';
}else{
echo '<h2>'; the_category(); echo '</h2>';
}?>
<div class="entry clearfloat">
<?php the_content('<p class="serif">Mehr lesen? »</p>'); ?>
<?php wp_link_pages(array('before' => '<p><strong>Seiten:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
<?php edit_post_link('Beitrag editieren.', '<p>', '</p>'); ?>
</div>
<?php endwhile; endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Alles anzeigen