Ciao a tutti, ho creato il mio script il quale prende delle news e le mette a db come post associando le categorie.
Noto che se creo un post manualmente da admin e associo una categoria, dalla lista di categoria vedo il totale dei post associati.
Creando la categoria da script il conteggio rimane sempre a zero e le categorie che ho creato non si visualizzano nei widget dove selezionabili con SELECT (menu a tendina).
Alla creazione del post in pratica uso wp_insert_category() per creare la categoria e uso l’ID per la chiave post_category nell’array che passo a wp_insert_post().
Forse mi manca un passaggio ma al momento mi sfugge.
Grazie per eventuali risposte.