Visualizzazione 5 filoni di risposte
Visualizzazione 5 filoni di risposte
- Devi essere connesso per rispondere a questo topic.
Email: info@wpitaly.it
Home › Forum › Problemi Vari con WP › Funzione per la ricerca
Ciao a tutti vorrei chiedervi una cosa che non da solo non sono riuscito ad individuare.
Ho creato un plugin x WP (una sorta di catalogo prodotti) e vorrei implementarci un motore di ricerca interno.
Vorrei sfuttare e/o riadattare lo stesso codice usato nel core di WP per fare la ricerca nei post, ma non riuscito ad individuare questo codice. Mi sapreste dire in qule file sta?
Grazie
nei vari template, almeno in quello di default, dovresti trovare una pagina php dal nome serch.php o qualcosa del genere li dovresti trovare il codice per la ricerca.
Non ti do la sicurezza sul nome della pagina perchè sono al lavoro, ma se vai nel wiki e cerchi “gerarchia di un template” li dovrebbe essere indicato.
Ciao
ciao Elias, grazie della risposta!!
Nel file search.php ci sono solo le funzioni che avviano il loop di WP!! Sicuramente ci sarà qualche funzione da qualche parte che filtra il loop in base ai termini ricercati!
E’ propio questa la funzione che cerco….ma nn so proprio dove sia!!
se è una funziona prova nel file functions.php in wp-includes
ciao
ciao wolly e grazie anche a te!!
Non so se è in una funzione quello che cerco…cmq intanto guardo là¬
prova anche in query.php sempre in wp-includes
WPItaly - Copyright Creative Commons: CC BY-NC-SA 4.0