Home › Forum › Problemi Vari con WP › <!–more–>
-
AutorePost
-
-
8 Gennaio 2008 alle 1:14 #5475gerrylandoPartecipante
ciao a tutti rieccomi a postare un problema che ho cercato di risolvere a lungo… allora io ho creato un template pagina copiando il cdice dal index.php, che ho appicato ad una pagina, ed ho fatto in modo di togliere il contenuto di tale pagina e far comparire il contenutoo di una determinata categoria, fin qui tutto bene, ma vorrei anche utilizzare il tag <!–more–> che però non mi produce nessun effetto, invece il tag <!–nextpage–> mi taglia solo il post senza farmi comparire il tasto che mi permette di continuare a leggre il post… come posso risolvere?
<?php
/*
Template Name: lavori
*/
?>
<?php get_header(); ?>
<?php include ( TEMPLATEPATH . '/sidebar2.php' ); ?>
<div id="content">
<?php query_posts("page_id=-5") ?>
<?php query_posts("cat=29") ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="boxpost">
<div class="datario"><?php the_time('M d Y'); ?></div>
<div class="post">
<h2 id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></h2>
<div class="entry">
<?php posts_nav_link(); ?>
<?php the_content('Read the rest of this entry �'); ?>
</div>
<p class="postmetadata">/images/folder_edit.png" alt="category"> <?php the_category(', ') ?> /images/comments.png" alt="comments"> <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?> <?php edit_post_link('//Edit'); ?>
<!-- <?php trackback_rdf(); ?> -->
</div></div>
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php posts_nav_link('','','� Previous Entries') ?></div>
<div class="alignright"><?php posts_nav_link('','Next Entries �','') ?></div>
</div>
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center"><?php _e("Sorry, but you are looking for something that isn't here."); ?>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?>
<?php get_footer(); ?>
se non sbaglio il codice c'è! allora in cosa sbaglio?
ho appena constatato che appena supero il numero max dipost per pagina mi sballa tutto...qualcuso sa aiutarmi?
-
8 Gennaio 2008 alle 12:08 #49338SteveAglAmministratore del forum
Perchè per navigare fra le sezioni di una pagina (il <!–nextpage–> può, a differenza del more, comparire più volte in una pagina) occorre usare wp_link_pages ( http://codex.wordpress.org/Template_Tags/wp_link_pages ) e non i tag di navigazione degli articoli post_*
-
8 Gennaio 2008 alle 13:34 #49345gerrylandoPartecipante
cioa steve grazie per la risposta, aggiustando il codice sono riuscito ad far funzionare il <!–nextpage–> ma avrei un’altro pobleino da sottoporvi… ho impostato in opzioni – lettura la visualizzazone a 3 post (per esempio) e scrivendo il 4 post mi compare previous entry e next entry (i nav_link) ma non cambiano i post, presumo perchè il codice si riferisca ai post e non alle pagine.. ho fatto una ricerca veloce e delle prove, ma non sono riuscito a risolverlo…
il tema che uso è cyper ma ho apportato delle modifiche…
l’indirizzo dove poter vedere il mio problema è questo
-
8 Gennaio 2008 alle 14:02 #49349SteveAglAmministratore del forum
I post e le pagine sono per WP la stesa cosa ma gestite in maniera diversa, un post puoi vederlo singolarmente, o un insieme di post per una certa data o categoria o gli ultimi “enne” post, le pagine sono entità a se stanti quindi non vedi elenchi di pagine ma solo una pagina singola alla volta o hai una pagina con un elenco di altre pagine etc, non capisco perchè se vuoi usare le pagine per usarle come i post.. usa i post.
Altrimenti devi spiegarti bene perchè frasi del tipo: previous entry e next entry (i nav_link) ma non cambiano i post, presumo perchè il codice si riferisca ai post e non alle pagine..
Non spiegano nulla.. anzi.. se dividi una pagina con nextpage devi usare il tag che ti ho detto per navigare non fra le pagine ma fra le varie sottosezioni di una pagina.
-
8 Gennaio 2008 alle 22:36 #49371gerrylandoPartecipante
ti chiedo scusa steve… cerco di spiegarmi meglio… ho fatto una pagine in cui tramite un template di pagina richiamo i post di una determinata categoria… fin qui tutto bene… ho anche settato wp in modo da farmi apparire solanto gl ultimi 4 post pubblicati… il problema adesso mi sorge quando pubblico il 5 post, se voglio vedere il 1 post pubblicato non posso vederlo…
-
9 Gennaio 2008 alle 15:25 #49383SteveAglAmministratore del forum
Pubblica il codice del template di pagina su http://pastebin.com/ e fornisci l’indirizzo alla pagina cosଠda poter guardare il codice e modificarlo facilmente se necessario. probabilmente è il codice del template di pagina che è sbagliato. Se hai detto a WP di mostrare solo 4 post anche in home page ne vedi solo 4 vero?
-
9 Gennaio 2008 alle 16:15 #49385gerrylandoPartecipante
si anche in home ne vedo solo 4 ma a differenza dalla pagina in home posso vedere il primo post pubblicato…
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.