Salve, purtroppo il programmatore che mi ha sviluppato il blog mi ha lasciato con le braghe calate a risolvere questo problema.
io ho una pagina nel mio blog dove devo mettere una serie di post anche di vecchia data e voglio che compaiano tutti. Vengono memorizzati con la categoria "welcome".
il problema è che WP me ne visualizza solo 5, quelli vecchi vengono tolti a scalare rimpiazzati da quelli appena pubblicati.
il file php associato alla pagina è il seguente:
<?php
/*
Template Name: welcome
*/
get_header(); ?>
<div id="content" class="clearfix single" role="main">
<div id="middle" class="clearfix">
<?php include (TEMPLATEPATH . '/sidebar_single.php'); ?>
<div id="contentMiddle" class="welcome">
<h2 id="welcomeTT" class="hide"><?php the_title(); ?></h2>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="post">
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
<?php wp_link_pages(array('before' => '
Pages: ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
</div>
<?php endwhile; endif; ?>
<!--?php edit_post_link('Edit this entry.', '
', '</p>'); ?-->
<?php
global $post;
$myposts = get_posts('category_name=welcome');
foreach($myposts as $post) :
setup_postdata($post);
?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<h2 class="ttwelcome"><?php the_title(); ?></h2>
<div class="entry">
<?php the_content('Read the rest of this entry »'); ?>
</div>
<!--<p class="postmetadata"><?php the_tags('Tags: ', ', ', '
'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' '); ?> by <?php the_author() ?> </p>-->
</div>
<?php endforeach; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
</div>
</div>
Qualcuno riesce ad aiutarmi perfavore?
Grazie mille,
Vincenzo

Rispondi quotando