Home › Forum › Problemi Vari con WP › Includere una Pagina in un template
-
AutorePost
-
-
17 Marzo 2008 alle 20:37 #6057TremisferoPartecipante
Salve a tutti.
Se è facile inserire articoli o liste di articoli dentro un template, non ho trovato spiegato il comando per includere una Pagina (quelle interne di wordpress, da database per intenderci) di cui conosco l’id.
Perchè il modo esiste… vero?
-
18 Marzo 2008 alle 7:14 #51616SteveAglAmministratore del forum
Veramente le pagine si fan diversamente, si crea un template di pagina (vedi wiki) e quando si scrive una pagine lo si assegna alla pagina desiderata tramite il controllo Template pagine… quindi son le pagine che scelgono un template e non viceversa, anche perchè non vedo l’utilità della funzione contraria.
-
20 Marzo 2008 alle 11:57 #51656TremisferoPartecipante
Hai ragione eheh… ma quindi il contenuto della pagina che si inserisce tramite interfaccia WP (ossia quello che finisce nel database) come lo tiro fuori nel template con la pagina associata?
Immagino dovrò usare the_content, ma per la query che mi deve estrarre la pagina giusta?
Quindi:
– creo un template
– creo la pagina sul database tramite WP
– associo a suddetta pagina il template
– Come esraggo nel template il contenuto della pagina da database? Con quale query?
-
20 Marzo 2008 alle 12:06 #51657wollyAmministratore del forum
stai facendo un pò di confusione.
il template di pagina fa già tutto
ti suggerisco di leggere nel wiki la sezione sulla creazione del template di pagina perchè non basta il the_content.
ciao
-
20 Marzo 2008 alle 12:11 #51658TremisferoPartecipante
Allora… mi rendo conto di essermi speigato decisamente male.
Devo creare una pagina che abbia contenuto php e contenuto da database (ossia una Pagina di WP).
Non voglio usare un plugin che permetta di inserire php nel codice della pagina perchè il sito non sarà gestito da me e non posso permettere che questi facciano casini.
Quindi vorrei che i futuri amministratori del sito possano modificare solo un blocco di testo della pagina, che sarà quello contenuto del database, mentre la parte in php deve restare inalterata.
TITOLO
Corpo della pagina in
wp, corpo della pagina
in wp, corpo della
pagina in wp.
Roba tirata fuori con
php e che non deve
essere modificabile.
Come fare?!?
-
20 Marzo 2008 alle 12:21 #51659SteveAglAmministratore del forum
Ovviamente il contenuto della pagina a cui è associato un dato template viene visualizzato nel template di pagina da the_content
Lettura suggerita:
http://www.wpitaly.it/wiki/Main/UtilizzarePagine
Aggiungo che una pagina può avere un titolo e nessun contenuto perchè associato ad un template che contiene già tutto il testo, metodo utilizzato per realizzare pagine completamente statiche.
-
20 Marzo 2008 alle 12:42 #51661EliasPartecipante
forse dico una bestialità , ma non si può creare un utente con permessi ristretti alla sola modifica dei contenuti di pagina tipo articoli e basta?
Quindi inibendogli tutti quei comandi che l’amministratore ha a disposizione per, ad esempio, modifcare e creare template?
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.