Visualizzazione 3 filoni di risposte
Visualizzazione 3 filoni di risposte
- Devi essere connesso per rispondere a questo topic.
Email: info@wpitaly.it
Home › Forum › Problemi Vari con WP › the_category
Ho bisogno di fare in modo che, le categorie di un post, mi appaiano con questo codice < a href=”url_categoria” >< span >categoria</ span ></ a >
Da quanto sono riuscito a capire, con la funzione the_category non posso. Qualcuno mi sa dire come posso fare?
Non c’è modo di formattare il tag the_category? Io ho provato modificando WP nei file category-template.php e classes.php. Era andata bene, ma si sono rovinati i feed, che non mostravano più le lettere accentate, sostituendo con punti interrogativi o virgolette.
No ma se usi get_the_category ( http://codex.wordpress.org/Template_Tags/get_the_category ) che ti restituisce un array di oggetti uno per ciascuna categoria dell’articolo, mancano i link ma quelli li ricavi con get_category_link ( http://codex.wordpress.org/Function_Reference/get_category_link )a questo punt hai tutti i dati che puoi elaborare a piacere in PHP e fare l’output che preferisci.
Ah, ok, grazie, mille, me lo studio. Avevo già visto ma non sapevo come incastrarli. Ora vedo.
WPItaly - Copyright Creative Commons: CC BY-NC-SA 4.0