Home › Forum › Problemi Vari con WP › Aggiungere sezione
-
AutorePost
-
-
19 Aprile 2007 alle 13:27 #3615maxtnPartecipante
Ho cercato ovunque ma non trovo come aggiungere una nuova sezione (oltre a Categorie, Pagine, Link,…) per pagine statiche a wordpress.
Se si potesse mettere lo stesso stile di carattere delle sezioni Categorie, Pagine, … ai titoli delle pagine e lasciare quello attuale per le sottopagine risolverei il problema, ma non so come modificarlo!
Qualcuno sa aiutarmi per favore?
-
19 Aprile 2007 alle 21:47 #44368ondapiPartecipante
Ciao
Categorie, Pagine, Link … sono contenuti in sidebar.php del tuo tema grafico
puoi aggiungere togliere pezzi di codice, formattare …
-
20 Aprile 2007 alle 7:01 #44370maxtnPartecipante
Si lo so che è in sidebar.php ma speravo che qualcuno mi desse qualche esempio, non vorrei fare casini!
-
20 Aprile 2007 alle 12:51 #44372ondapiPartecipante
dipende da cosa vuoi inserire in sidebar, puoi mettere gli ultini post, il calendario, immagini, link,
se hai paura di sbagliare
1 salva una copia dell’originale
2 lavora in locale nel tuo pc, cosଠfai tutte le prove che vuoi e non corri il rischio difare orrori
ciao
-
20 Aprile 2007 alle 13:24 #44373maxtnPartecipante
Vorrei mettere altre sezioni tipo quella “Pagine”…
potrei anche usare pagine e sottopagine nella sezione “Pagine” però vorrei che le sottopagine apparissero solamente cliccando sulla pagina madre, invece me le fa vedere tutte.
-
20 Aprile 2007 alle 19:15 #44374ondapiPartecipante
ha dato un occhio qui se ci può essere qualcosa di utile
<?php wp_list_pages('sort_column=menu_order&depth=1&title_li=<h2>Pagine</h2>'); ?>
questo pezzo di codice dovrebbe visualizzare solo le pagine madri e non le sottopaginelo puoi tenere nella sidebar e sotto invece puoi inserire questo altro pezzo che ti fa vedere le relative sottopagine in una pagina se queste esistono
<!--modulo pagina sottopagina -->
<?php /* Creates a menu for pages beneath the level of the current page */
if (is_page() and ($notfound != '1')) {
$current_page = $post->ID;
while($current_page) {
$page_query = $wpdb->get_row("SELECT ID, post_title, post_status, post_parent FROM $wpdb->posts WHERE ID = '$current_page'");
$current_page = $page_query->post_parent;
}
$parent_id = $page_query->ID;
$parent_title = $page_query->post_title;
if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_status != 'attachment'")) { ?>
<div class="sb-pagemenu"><h2> Sottopagine in <?php echo $parent_title; ?>:</h2>
<ul>
<?php wp_list_pages('sort_column=menu_order&title_li=&child_of='. $parent_id); ?>
</ul>
<?php if ($parent_id != $post->ID) { ?>
<a href="<?php echo get_permalink($parent_id); ?>"><br/><br/>ritorna a <?php echo $parent_title; ?></a>
<?php } ?>
</div>
<?php } } ?>
<!--fine modulo pagina sottopagina -->
io l’ho prelevato cosଠcom’è dal tema K2 e funziona bene
-
23 Aprile 2007 alle 7:34 #44402maxtnPartecipante
Grazie per l’aiuto, ho dato un’occhiata al link che mi hai dato e in effetti dovrei usare “depth=1” ma non funziona e non capisco perchè!
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.