Risposte nei forum create
-
AutorePost
-
dad0tratt0Partecipante
Ora non ho tempo per studiare il codice.
Ma puoi aggiungere un azione al salvataggio che lo mette in bozza se non supera i limiti che vuoi tu.
Fin quଠc’ero arrivato, il problema è che non conosco PHP.
dad0tratt0Partecipantei post contenenti meno di 150 caratteri
@dad0tratt0 Comunque è per 150 parole, non caratteri.
Si, sorry, mio errore.
dad0tratt0Partecipanteperché hai modificato lo snippet e gli fai fare il salvataggio in draft tu, ogni volta.
La mia intenzione è quella di mandare in draft il post qualora non raggiunga un minimo di 150 parole.
Come potrei modificarlo per fare ciò?
dad0tratt0PartecipanteMettimi il link da dove hai copiato quello snippet.
http://www.wpbeginner.com/wp-tutorials/how-to-set-a-minimum-word-count-for-wordpress-posts/
dad0tratt0PartecipanteMa comemai senza lo snippet non succede?
dad0tratt0Partecipantelo fa wordpress.
Se vuoi puoi disabilitarle i salvataggi automatici
Grazie per la risposta!
Un paio di domande:
1. Come si disattiva il salvataggio automatico?
2. Comemai, eliminando lo snippet di cui sopra, le bozze a random non vengono più create?
17 Marzo 2016 alle 9:41 in risposta a: Plugin conteggio numero parole prima della pubblicazione #120118dad0tratt0PartecipanteImpazzire addirittura, ma leggere le istruzioni no eh?
Eppure il link te l’ho dato.
Il plugin permette la scrittura di articoli dal frontend: [fep_submission_form] per avere il form.
L’altro shortcode è per avere la lista degli articoli.
Nell’unica, semplice pagina di configurazione configuri le impostazioni secondo le tue esigenze (scorri fino in fondo).
Non so cos’altro non ti torna.
Il mio dubbio era relativo unicamente allo shortcode, e, più precisamente, sul relativo obbligo di utilizzarlo, ecco cosa non mi tornava.
16 Marzo 2016 alle 9:35 in risposta a: Plugin conteggio numero parole prima della pubblicazione #120093dad0tratt0PartecipantePer beneficio del dubbio ho scaricato e provato il plugin ora, e funziona. Il post non è inviato alla revisione né pubblicato se non rispetta i parametri, ma ovviamente dipende da cosa hai messo in “role settings”. Quindi sicuramente non l’hai configurato correttamente secondo ciò che ti aspetti.
Dall’inutile immagine che hai allegato non si vede come hai configurato il resto, peraltro di facile comprensione.
Il link che ti ho messo e che hai ignorato è al loro supporto: rivolgiti lଠse sei sicuro di averlo configurato giusto.
Sto impazzendo con questo plugin. Una curiosità : te l’hai semplicemente attivato e impostato i limiti nel conteggio o inserito qualche tag nel sito per il suo funzionamento?
15 Marzo 2016 alle 13:12 in risposta a: Plugin conteggio numero parole prima della pubblicazione #120083dad0tratt0PartecipantePer beneficio del dubbio ho scaricato e provato il plugin ora, e funziona. Il post non è inviato alla revisione né pubblicato se non rispetta i parametri, ma ovviamente dipende da cosa hai messo in “role settings”. Quindi sicuramente non l’hai configurato correttamente secondo ciò che ti aspetti.
Dall’inutile immagine che hai allegato non si vede come hai configurato il resto, peraltro di facile comprensione.
Il link che ti ho messo e che hai ignorato è al loro supporto: rivolgiti lଠse sei sicuro di averlo configurato giusto.
Innanzitutto grazie per la risposta! Nel frattempo, ho risolto tramite questo snippet:
function minWord($data){
if (current_user_can('editor')) {
$num = 150; //set this to the minimum number of words
if (str_word_count($data) < $num) {
$data = 'draft';
}
}
return $data;
}
add_action('wp_insert_post_data','minWord');
Il problema è solo uno adesso, e chiedo aiuto a voi, visto che di PHP capisco poco, utilizzando altre piattaforme.
Il codice funziona bene, mettendo in bozze gli articoli che non rispettano i criteri, ma vorrei mostrare un avviso per comunicare il "problema". Ho visto questo codice:
wp_die( __('Error: your post is below the minimum word count.') );
Il problema è: come integrarlo nel mio?15 Marzo 2016 alle 9:27 in risposta a: Plugin conteggio numero parole prima della pubblicazione #120078dad0tratt0Partecipantehttps://wordpress.org/support/plugin/front-end-publishing
L’ho impostato come da immagine presente qualche post più su, ma nonostante le regole non vengano rispettate, viene mostrato si l’avviso, ma l’articolo va comunque online.
-
AutorePost