Home › Forum › Problemi Vari con WP › Creare una pagina menù per le categorie
-
AutorePost
-
-
24 Marzo 2010 alle 22:43 #13429mobiletechPartecipante
Ciao a tutti volevo chiedere ai piu esperti se era possibile creare una pagina nel menu con tutte le categorie..anzichè avere il widget nella sidebar.
Per farvi un esempio pratico potete andare sul mio blog http://mobiletech.altervista.org Quello che voglio fare è un menu tipo archivio che vedete in alto, solamente che avere l’archivio delle notizie avere tutte le categorie. ovviamente la pagina si dovrà auto aggiornare all’ aggiunta successiva di categorie.
e’ possibile fare cio?
-
24 Marzo 2010 alle 22:56 #72372degraPartecipante
sà¬, nel menu (dovrebbe essere in header.php) sostituisci il tag wp_list_pages() con wp_list_categories()
-
25 Marzo 2010 alle 11:55 #72384mobiletechPartecipante
Non ho capito. la pagina archivio la voglio lasciare. ne voglio creare un’altra simile per le categorie. ho provato a creare una pagina nuova e scrivere wp_list_categories() ma non funge.
-
25 Marzo 2010 alle 13:02 #72386degraPartecipante
allora non ho capito cosa vorrsti fare. io pensavo volessi un menu orizzontale con al posto delle pagine le categorie.
-
25 Marzo 2010 alle 19:22 #72394mobiletechPartecipante
ok guarda il mio blog che t ho segnalato prima.in alto nel menu dove cè home archivio e info contatti. ok io vorrei creare un altra voce chiamata ‘ tutte le categorie’ dove cliccandoci sopra si apra la pagina con tutte le categorie presenti. Voglio una cosa simile a quello che gia uso per l’archivio delle notizie. qui ho usato un plugin ma non so se esiste anche per le categorie. Non voglio lasciarle nella sidebar come menu a discesa capito?
-
25 Marzo 2010 alle 20:28 #72396degraPartecipante
ora sଠche ho capito: parlando di menu mi avevi confuso.
ma la risposta è la stessa: usa wp_list_categories(). Ovviamente non puoi copiarlo nel testo di una pagina ma, come puoi leggere nella pagina che descrive tutte le funzioni e la sintassi del tag, va inserito nel codice creando un template di pagina ad hoc. Per i template vedi qui (c’è anche l’esempio specifico di quello che chiedi tu, ma bisogna sostituire wp_list_cats() che è una funzione deprecata con wp_list_categories() ).
-
26 Marzo 2010 alle 23:58 #72410mobiletechPartecipante
ora sଠche ho capito: parlando di menu mi avevi confuso.
ma la risposta è la stessa: usa wp_list_categories(). Ovviamente non puoi copiarlo nel testo di una pagina ma, come puoi leggere nella pagina che descrive tutte le funzioni e la sintassi del tag, va inserito nel codice creando un template di pagina ad hoc. Per i template vedi qui (c’è anche l’esempio specifico di quello che chiedi tu, ma bisogna sostituire wp_list_cats() che è una funzione deprecata con wp_list_categories() ).
ciao grazie per la risposta. c ho provato ma niente non ci riesco. questa è la mia struttura di pagina…dove lo inserisco wp list categories e come? riesci a farmi un esempio pratico per favore? ti ringrazio
<?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">/">Home » <?php the_title(); ?></span>
<h2 class="title"><?php the_title(); ?></h2>
<div class="entry clearfloat">
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
<?php wp_link_pages(array('before' => '<p>Pages: ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
</div>
<div id="comments">
<?php comments_template(); ?>
</div>
<?php endwhile; endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.