Replies
Gentle Reminder sir
- Tosin on March 3, 2022 at 11:01 am in reply to: [Resolved] Pay Per Post by selling access with WooCommerce #43672
Thanks Ravi
Your code worked perfectly
- Tosin on March 3, 2022 at 9:00 am in reply to: [Resolved] Pay Per Post by selling access with WooCommerce #43666
or this
function wp_set_post_categories( $post_id, $post_categories, $append = true ) { if ( $post->post_type != 'post' ) return; // add a category $categories = wp_get_post_categories( $post_id ); $newcat = get_term_by( 'name', 'Sponsored posts', 'category' ); array_push( $categories, $newcat->term_id ); wp_set_post_categories( $post_id, $categories ); } do_action( 'bblpro_ppp_post_published', $post_id, $form_id );
- Tosin on March 2, 2022 at 7:49 pm in reply to: [Resolved] Pay Per Post by selling access with WooCommerce #43663
Hello Ravi,
Please can you take a look at this rough work
function wp_set_post_category( $post_id, $post_categories, $append ) { if ( $parent = wp_is_post_revision( $post_id ) ) $post_id = $parent; $post = get_post( $post_id ); if ( $post->post_type != 'post' ) return; // add a category $categories = wp_get_post_category( $post_id ); $newcat = get_term_by( 'name', 'Sponsored posts', 'category' ); array_push( $categories, $newcat->term_id ); wp_set_post_category( $post_id, $categories ); } do_action( 'bblpro_ppp_post_published', $post_id, $form_id );
Thanks
- This reply was modified 2 years, 9 months ago by Tosin.
- Tosin on March 1, 2022 at 12:48 pm in reply to: BuddyPress Friendship Restrictions support for follow #43648
ok thanks
Hello Brajesh,
Hope you did not forget about this, you gave an eta as at January.
Thanks
- Tosin on March 1, 2022 at 9:01 am in reply to: BuddyPress Friendship Restrictions support for follow #43629
Kind reminder sir
- Tosin on February 28, 2022 at 10:01 pm in reply to: [Resolved] Buddyblog Pro – select only one category not excluding categories #43620
Thanks brajesh this is now resolved
- Tosin on February 28, 2022 at 10:00 pm in reply to: [Resolved] Buddyblog pro – mobile display adjustment #43619
Thanks brajesh this is now resolved
- Tosin on February 26, 2022 at 5:47 pm in reply to: [Resolved] Pay Per Post by selling access with WooCommerce #43586
Hello
Please how can I automatically add a post that was paid for to additional category
e.g
1. Post A was paid for
2. After payment is successful
3. Add submitted post to another category (sponsored post)