Home › Forum › Problemi Vari con WP › plugin “seo image galleries”
-
AutorePost
-
-
1 Agosto 2010 alle 10:22 #14626peopleatworkPartecipante
Ciao,
sto provando ad usare il plugin “seo image galleries” con il tema “Gallery” (di Chris Wallace”) e avrei bisogno di un aiuto.
Se inserisco il codice:
[seo_thumb_gallery category=”categoria1″ gallery=”galleria1″]
all’interno del post vedo la galleria ma io preferirei usare l’istruzione:
<?php seo_thumb_gallery(‘category_name’, ‘gallery_name’); ?>
da inserire nel mio tema.
Ho trovato il punto dove inserirla ma come faccio a parametrizzarla?
Cioè io vorrei inserire:
<?php seo_thumb_gallery(‘category_name’, ‘gallery_name’); ?>
e nel post settare:
category_name= categoria1
gallery_name=galleria1
in modo che per ogni post posso inserire dei valori diversi
Devo farlo con i campi personalizzati? ho provato ma non è andata bene
Potete aiutarmi?
Grazie
-
1 Agosto 2010 alle 10:37 #75731SteveAglAmministratore del forum
SI la strada è quella ma perchè complicarsi la vita il shortcode è più flessibile rimane nell’articolo non serve il campo personalizzato etc etc… ovvioc he se la gallery finisce fuori dall’articolo si imposti campi personalizati es galcat e galname e poi:
$custom_fields = get_post_custom();
if ( $custom_fields && $custom_fields {
seo_thumb_gallery($custom_fields, $custom_fields);
}
che dovrebbe funzionare, ovviamente qui non c’è codice che controlla che vi sia un solo custom field per tipo e congruenze varie…
-
1 Agosto 2010 alle 11:07 #75732peopleatworkPartecipante
si è vero, la soluzione del shortcode è facile e immediata, mi piacerebbe poterla usare ma nel mio tema (Gallery, non so se hai presente) il contenuto del post è a destra mentre a sinistra ho la foto ingrandita della gallery appunto. Io vorrei inserire una galleria di altre foto sotto la foto principale e per farlo devo agire sul file functions.php (almeno questo è quello che ho capito) , tu pensi si possa fare in un altro modo?
intanto provo il modo che mi hai suggerito
grazie
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.