Home › Forum › Plugin e temi di WP › Modificare la lunghezza di un post (Featured) in Home page
-
AutorePost
-
-
13 Gennaio 2009 alle 11:02 #9085dimarsabaPartecipante
Saleve,
ho necessità di moficare la lunghezza del ‘Feautured’ (il classico primo piano), presente nella home di un sito/blog che sto costruendo, praticamente il ‘Featured’ diventerebbe la presentazione del sito, e siccome dal template ciò è limitato facendo passare il tutto al classico ‘Read More’, vorrei eliminare il problema stabilendo Io la lunghezza dell’articolo, ovviamente i restanti post come ‘articoli inseriti’ rimarrà tale e quale.
nel template sono presenti due siturzioni in php per gestire le due cose separatamente inserisco quello che interessa la modifica:
<h3> Benvenuti </h3>
<div class=”listings”>
<!– category ID define in Featured Category Example : “cat=12, 14” –>
<?php $my_query = “cat=0” . $np_pop_cat . “&showposts=1”; $my_query = new WP_Query($my_query); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
<?php $postimg = get_post_meta($post->ID, ‘postimg’, $single = true); ?>
” alt=”” class=”imgspcaer” />
<h2>” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h2>
<div class=”post_top”>
<p class=”auth”> By <?php the_author_posts_link(); ?> at <?php the_time(‘j F, Y’) ?>, <?php the_time(‘g:i a’) ?></p>
</div><!–post top end–>
<?php the_excerpt(); ?>
<?php endwhile; ?>
</div>
Ciao e grazie anticipatamente.
-
13 Gennaio 2009 alle 12:31 #61188SteveAglAmministratore del forum
Usando un plugin che ti permetta di determinare la lugheza dell’outpu di the_excerpt… come:
-
13 Gennaio 2009 alle 14:12 #61191dimarsabaPartecipante
Premesso che lo proverò sicuramente, e per questo ti ringrazio, ma che tu sappia permette di selezionare cosa allungare o effettua uan modifica senza distinzione?
Ciao
-
13 Gennaio 2009 alle 14:37 #61193dimarsabaPartecipante
Infatti è come pensavo, attivando il plugin, ottimo per altro, modifica tutta l’istruzione ‘the_excepert’ ovunque essa sia, invece il mio scopo era quello di modificare solo l’istruzione del ‘Benenvenuto’ per intenderci, ovviamente la visione dei post nel classico modo cronologico avverrà cmq in quanto la stessa è ripetuta nel template poco più sotto. Il template ha al suo interno due istruzioni, una per il ‘Fetaured’ e l’altra per ‘Ultimi articoli inseriti’ che poi non son la visione dei post.
Ci sarebbe un’altro sistema?
Ciao
-
13 Gennaio 2009 alle 14:46 #61195dimarsabaPartecipante
Infatti è come pensavo, attivando il plugin, ottimo per altro, modifica tutta l’istruzione ‘the_excepert’ ovunque essa sia, invece il mio scopo era quello di modificare solo l’istruzione del ‘Benenvenuto’ per intenderci, ovviamente la visione dei post nel classico modo cronologico avverrà cmq in quanto la stessa è ripetuta nel template poco più sotto. Il template ha al suo interno due istruzioni, una per il ‘Fetaured’ e l’altra per ‘Ultimi articoli inseriti’ che poi non son la visione dei post.
Ci sarebbe un’altro sistema?
Ciao
Risolto, ho modificato l’istruzione <?php the_excerpt(); ?> con <?php the_content(); ?> anzichè farmi vedere i 55 caratteri, fa vedere tutto l’articolo inserito, mentre la seconda parte del template richiama di nuovo la vecchia istruzione <?php the_excerpt(); ?> facendo vedere i post inseriti nel classico modo.
Ciao
-
13 Gennaio 2009 alle 14:50 #61196wollyAmministratore del forum
scrivi a mano il riassunto del post della lunghezza che vuoi, mostrerà sempre quello
-
13 Gennaio 2009 alle 14:57 #61198dimarsabaPartecipante
scrivi a mano il riassunto del post della lunghezza che vuoi, mostrerà sempre quello
Dove scriverlo scusa? Potresti spiegarti meglio? te ne sarei grato.
Ciao
-
13 Gennaio 2009 alle 14:59 #61199wollyAmministratore del forum
nel campo riassunto che trovi quanto posti.
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.