Home › Forum › Amministrazione WP › Blocco Categorie contestuale alla pagina
-
AutorePost
-
-
8 Settembre 2009 alle 13:38 #11546jarod81Partecipante
Salve a tutti … questo è il mio primo post … mi sto affacciando ora a WP per la prima volta, lo considero un grand bel progetto e l’ho installato per ora localmente. Ovviamente devo ancora prenderci un po la mano … Ad esempio:
Vorrei che il blocco delle categorie presente nella sidebar, cosଠcome il blocco dei link, cambiassero a seconda della pagina in cui mi trovo. Quindi se seleziono la pagina Software, il blocco links presenti i link di tutte le software house con cui collaboro mentre nella pagina Hardware lo stesso blocco faccia sparire i link delle software house ma mettesse i link dei siti ufficiali dei fornitori. La stessa cosa legata alle categorie.
Mi rendo conto che WP è un editor per blog e non un vero e proprio CMS, essendo uno sviluppatore mi vorrei rendere conto in fretta se wp sarebbe in grado di venire in contro alle mie esigenze o se faccio prima a svilupparmi un’applicazione di backend e di frontend (come ho sempre fatto fino adesso).
Un’altra cosa …
Tra le cose che ho capito, è che se creo nuove pagine automaticamente wp me le presenta nel menu di navigazione.
C’è modo di creare una pagina (ad esempio homepage) e non inserire il link nel menu di navigazione? Vorrei che venisse fuori solo come homepage al posto dei post più recenti.
Non ho ancora fatto ricerche approfondite in internet perchè non ho molto tempo per capire se posso usare la piattaforma wordpress per lavorare, per questo posto qui sperando che qualcuno abbia le mie stesse necessità e che magari le abbia risolte o comunque mi possa dare utili consigli.
PS: Ovviamente con questo non intendo far fare a wp i miracoli, per i progetti complessi continuerò a svilupparlo ad-hoc ma se riuscissi a sfruttare anche solo la parte di backend di wordpress per gestire i contenuti sarebbe un ottimo risultato!
Grazie a tutti ciao!
-
9 Settembre 2009 alle 12:21 #68213kifulabPartecipante
[…]
Vorrei che il blocco delle categorie presente nella sidebar, cosଠcome il blocco dei link, cambiassero a seconda della pagina in cui mi trovo. Quindi se seleziono la pagina Software, il blocco links presenti i link di tutte le software house con cui collaboro mentre nella pagina Hardware lo stesso blocco faccia sparire i link delle software house ma mettesse i link dei siti ufficiali dei fornitori. La stessa cosa legata alle categorie.
WordPress ha una struttura gerarchica dei template che ti permette di fare questo ed altro. Tutto quello che ti server è un po di tempo per studiare. Qui: http://codex.wordpress.org/Template_Hierarchy trovi la documentazione sulla gerarchia dei template.
Nel tuo caso puoi fare caricare sidebar diverse a seconda della categoria. Una cosa che mi viene cosଠdi acchito in mente potrebbe essere:
<
<?php
$categorie = array(2,3,4,5,6);
foreach($categorie as $categoria){
if(is_category($categoria)){
require_once “sidebar-{$categoria}.php”;
}
}
?>
Ovviamente è solo un esempio…
Mi rendo conto che WP è un editor per blog e non un vero e proprio CMS, essendo uno sviluppatore mi vorrei rendere conto in fretta se wp sarebbe in grado di venire in contro alle mie esigenze o se faccio prima a svilupparmi un’applicazione di backend e di frontend (come ho sempre fatto fino adesso).
Se non è un CMS cos’è?
Un’altra cosa …
Tra le cose che ho capito, è che se creo nuove pagine automaticamente wp me le presenta nel menu di navigazione.
C’è modo di creare una pagina (ad esempio homepage) e non inserire il link nel menu di navigazione? Vorrei che venisse fuori solo come homepage al posto dei post più recenti.
Nella funzione wp_list_pages() devi specificare l’id delle pagina da escludere: wp_list_pages(“exclude=XX”)
Non ho ancora fatto ricerche approfondite in internet perchè non ho molto tempo per capire se posso usare la piattaforma wordpress per lavorare, per questo posto qui sperando che qualcuno abbia le mie stesse necessità e che magari le abbia risolte o comunque mi possa dare utili consigli.
Inutile dirti che appena lo studi approfonditamente lo puoi usare per progetti molto complessi. C’è però anche la possibilità di usare il solo backend e creare un’applicazione tutta “tua” lato front.
Basta includere il file wp-blog-header.php in ogni file della tua applicazione per avere il framework a portata di mano.. Semplice no?
PS: Ovviamente con questo non intendo far fare a wp i miracoli […]
Li fa già
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.