only publish some category publisize
-
Hello,
I ad something for subscription and I would do the same for publisize, it is possible? Or better only publish some category
add_filter( 'jetpack_subscriptions_exclude_all_categories_except', 'exclude_all_except' ); function exclude_all_except( $categories ) { $categories = array( 'assurance', 'commerce', 'internet', 'comptabilite', 'credit', 'developpement-personnel', 'articles-finance', 'les-arnaques', 'articles-les-bons-plans', 'articles-investissements', 'bourse', 'patrimoine', 'crowfunding', 'fiscalite', 'immobilier', 'produits-bancaires', 'livres', 'articles-economie'); return $categories; }
thank you
I found this but I m not able to use it to exclude category purple and a second category green for example
add_filter( 'wpas_submit_post?', 'vipx_wpas_submit_post', 10, 4 ); function vipx_wpas_submit_post( $ret, $post_id, $name, $connection ) { $categories = get_the_terms( $post_id, 'category' ); if ( is_array( $categories ) ) $categories = wp_list_pluck( $categories, 'slug' ); if ( ! in_array( 'le-nom-de-votre-categorie-a-exclure', $categories ) ) $ret = false; return $ret; }
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘only publish some category publisize’ is closed to new replies.