Email: info@wpitaly.it
Ops verissimo,
grazie per avermelo ricordato.
Ho dovuto far fronte a un’urgenza ma quanto prima creerò il tema child
buona giornata, WP guardato un po’ più da vicino non fa poi cosଠpaura
Roberto
Salve a tutti e grazie per chi ha provato a darmi una mano.
Non so se può essere utile ma in realtà ho risolto e quindi vi posto la procedura, per altro non difficile.
1) Per intercettare in querystring una variabile personalizzata è bastato aggiungere questo codice in wp-includes/query.php:
function add_query_vars_filter( $vars ){
$vars[] = “recid”;
return $vars;
}
add_filter( ‘query_vars’, ‘add_query_vars_filter’ );
2) nel template da me clonato ho aggiunto:
$recid = (get_query_var(‘recid’)) ? get_query_var(‘recid’) : 1;
ogni volta che la variabile $recid è != 1 faccio eseguire il codice che voglio io.
Buona giornata!
Dunque, spero di avere compreso le domande
Quando in wordpress vado a comporre una pagina, sulla destra ho la possibilità di scegliere un modello di pagina..
La mia necessità è quella di fare in modo che quando viene creata una pagina contenente il modello di pagina da me creato (pippo) venga caricato del contenuto specifico pre-impostato e venga intercettato anche un valore passato in querystring.
Spero di essermi spiegato meglio e non avere commesso infrazioni alla policy del forum
Grazie
Roberto
WPItaly - Copyright Creative Commons: CC BY-NC-SA 4.0