Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [HTML][PHP] problem z wyświetlaniem wpisów na WordPressie
Forum PHP.pl > Forum > Przedszkole
hmsz
Witam, mam pewien problem z szablonem arthemia free na WordPressie.

moja stronka: www.longmag.pl

W zakładce Świeże wyświetla się najnowszy wpis i to jest zrobione dobrze. Poniżej wyświetla się kilka postów, które udostępniłem. Chciałbym zrobić tak, aby najświeższy wpis wyświetlał się tylko w Świeże, a nie jeszcze poniżej. Powinien jeszcze automatycznie przenosić się ze Świeże do poniższych postów jeśli udostępniłbym nowszy post.

Wydaję mi się, że to trzeba ustawić w index.php.

Poniżej wrzucam cały kod index.php :


<?php get_header(); ?>

<?php if(!is_paged()) { ?>

<div id="top" class="clearfloat">

<div id="headline">
<img src="<?php echo get_option('home'); ?>/wordpress/wp-content/themes/arthemia/images/headline.png" width="75px" height="21px" alt="" />
<?php query_posts("showposts=1&category_name=newsy"); ?>
<?php while (have_posts()) : the_post(); ?>

<div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>
<div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('Brak komentarzy', 'Jeden komentarz', 'Komentarzy: %');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div>
<?php $values = get_post_custom_values("Headline");?>

<?php the_content('czytaj dalej'); ?>

<?php endwhile; ?>
</div>

<div id="Featured">

<img src="<?php echo get_option('home'); ?>/wordpress/wp-content/themes/arthemia/images/featured.png" width="72px" height="17px" alt="" />


<?php query_posts("showposts=4&category_name=Featured"); $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="StaAy link do wpisu <?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=100&h=65&zc=1&q=100"
alt="<?php the_title(); ?>" class="left" width="100px" height="65px" /></a>
<?php } ?>
<div class="info"><a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title(); ?></a>
<div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('Brak komentarzy', 'Jeden komentarz', 'Komentarzy: %');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div>

</div>
</div>

<?php endwhile; ?>

</div>

</div>

<div id="middle" class="clearfloat">

<?php $display_categories = array(6,5,7,10,9); $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=-27,-28&paged=$page&posts_per_page=5"); ?>

<?php while (have_posts()) : the_post(); ?>

<div class="clearfloat">
<h3 class=cat_title><?php the_category(', '); ?> &raquo</h3>
<div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>
<div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('Brak komentarzy', 'Jeden komentarz', 'Komentarzy: %');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div>

<div class="spoiler">
<?php $values = get_post_custom_values("Image");
if (isset($values[0])) { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="StaAy link do wpisu <?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=150&h=150&zc=1&q=100"
alt="<?php the_title(); ?>" class="left" width="150px" height="150px" /></a>
<?php } ?>

<?php the_content('czytaj dalej'); ?>
</div>

</div>

<?php endwhile; ?>

<div class="navigation">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
else { ?>

<div class="right"><?php next_posts_link('Nast�pna strona &raquo;') ?></div>
<div class="left"><?php previous_posts_link('&laquo; Poprzednia strona') ?></div>
<?php } ?>

</div>

</div>


<?php get_sidebar(); ?>

</div>

<?php get_footer(); ?>




z góry dziękuję za pomoc i Pozdrawiam
Mateusz
-gość-
A czy nie przypadkiem zmiana clearfloat z $i = 1 na 2? Spróbuj ale nie jestem pewien
hmsz
niestety nie pomogło
-hmsz-
Ponawiam prośbę, bardzo proszę o pomoc.

Dzięki
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.