Risposte nei forum create
-
AutorePost
-
2 Aprile 2012 alle 10:35 in risposta a: Immagine/media: dove vengono memorizzati gli attributi come "Testo alternativo"? #94731DonovantPartecipante
Ok risolto, nella tabella “wp_postmeta”.
15 Marzo 2012 alle 14:55 in risposta a: Plugin: Newsletter, qualcuno lo usa? Il test dell'invio email non funziona #94412DonovantPartecipanteRisolto…non so perchè ma non andava solo in locale.
14 Marzo 2012 alle 9:18 in risposta a: Fare in modo che gli articoli di una categoria non vadano nella home. #94366DonovantPartecipanteOk letto: Special note: The $query object passed to your function is passed by reference. You do not need to declare globals or return a value. Any changes you make to the object from inside your function are made to the original immediately.
14 Marzo 2012 alle 9:08 in risposta a: Fare in modo che gli articoli di una categoria non vadano nella home. #94365DonovantPartecipanteAnche se vorrei ancora che qualcuno mi spiegasse, come viene trattata la variabile $query, è un parametro, viene passato alla funzione implementata, ma all’interno della stessa viene trattata ($query) come se fosse un oggetto già instanziato.
Grazie.
14 Marzo 2012 alle 8:58 in risposta a: Fare in modo che gli articoli di una categoria non vadano nella home. #94364DonovantPartecipantescusatemi assaieee, ma non ho ancora dormito…non avevo visto che il nome della funzione veniva passato come stringa alla funzione add_filter(…) , grazie mille!!!
14 Marzo 2012 alle 8:45 in risposta a: Fare in modo che gli articoli di una categoria non vadano nella home. #94363DonovantPartecipanteHo provato a fare come diceva qui
<?php
if ( is_home() ) {
query_posts( ‘cat=-3’ );
}
?>
E nella prima pagina della home li esclude correttemente, ma quando vado ad articoli meno recenti, mi fa vedere sempre gli stessi della prima pagina, ?
14 Marzo 2012 alle 8:13 in risposta a: Fare in modo che gli articoli di una categoria non vadano nella home. #94361DonovantPartecipanteEh si la stavo leggendo…ma ancora non ho ben capito come usarla, e come cmq viene definita quella funzione, cioè la implementa, ma dove la richiama?
14 Marzo 2012 alle 8:05 in risposta a: Fare in modo che gli articoli di una categoria non vadano nella home. #94359DonovantPartecipanteIo cmq non capisco la definizione di function exclude_category($query), $query è un parametro, ma tu questa funzione dove la usi???
non capisco proprio.
Crei una funzione che usi dove? e add_filter(‘pre_get_posts’, ‘exclude_category’); come da te scritto, serve a modificare la query.
14 Marzo 2012 alle 2:16 in risposta a: Fare in modo che gli articoli di una categoria non vadano nella home. #94356DonovantPartecipanteIo nel loop avevo fatto cosଠ(conoscendo WP da pochi giorni, anche se l’ho usato una sola volta questa estate)
<?php
while ( have_posts() ) : the_post();
$categoria = get_the_category();
if( single_cat_title( '', false ) == '' && $categoria[0]->cat_name == "APPUNTAMENTI"){
continue;
}
?>
Ma come ho scritto in un altro post, se ho setatto di vedere 4 articoli per pagina, quando, per esempio, 2 di questi quattro fanno parte della categoria che non voglio vedere, nel resto della pagina vedrò solamente i restanti 2 post dei 4 totali per pagina.
La tua funzione la inserisci in function.php, ma poi dove la usi?
add_filter(….) cosa fa?
Grazie mille.
12 Marzo 2012 alle 15:34 in risposta a: Nelle preview ( the_excerpt() ) di un post, come fare a vedere una img o video? #94311DonovantPartecipanteRisolto con immagine in evidenza. Grazie
-
AutorePost