Replies
- Michael on June 18, 2024 at 3:09 pm in reply to: [Resolved] Delete all blog comments by specific user #52736
Thanks Brajesh,
– I looked at the Bulk Delete plugin but the functionality to delete comments per specific user id is only available in the premium version, and I will probably only use it only once.
– re. Recounting all the post comments, I’m unable to write the correct code myself, but I found the following on Stack overflow :
$entries = $wpdb->get_results("SELECT * FROM wp_posts WHERE post_type IN ('post', 'page')"); foreach($entries as $entry) { $post_id = $entry->ID; $comment_count = $entries = $wpdb->get_results("SELECT * FROM wp_posts WHERE post_type IN ('post', 'page')"); $wpdb->query("UPDATE wp_posts SET comment_count = '$comment_count' WHERE ID = '$post_id'"); }
– I tested in test environment, seems to work fine (albeit with a small number of posts)
Question – my live site has over 1000 posts, would the code be safe to use?
Thanks!
Hi Mark
This might possibly be of assistance?
Will remove the editor toolbar stuff.
Simply replace 9999 with your field id.function antipole_remove_rich_text( $field_id = null ) { if ( ! $field_id ) { $field_id = bp_get_the_profile_field_id( '9999' ); // replace 9999 with your field id } $field = xprofile_get_field( $field_id ); if ( $field ) { $enabled = false; } } add_filter( 'bp_xprofile_is_richtext_enabled_for_field', 'antipole_remove_rich_text' );
That works perfectly, thankyou very much Ravi for your assistance.
Hi Rik
You could change “/username/” to “/me/” in your link, this should then dynamically point at the logged-in user’s individual profile.
For example:
/members/me/profile
Thanks Ravi. works great.
But it produces unexpected result: the resulting larger avatar is very blurred, so I assume it is simply scaling up from the original 14px size.
I suppose I must look for a different solution.
Thankyou.
- Michael on October 7, 2022 at 12:36 am in reply to: [Resolved] How to hide “Required fields are marked *” in WP blog comments #46819
That worked perfectly, all done.
Thankyou, sir.
- Michael on October 7, 2022 at 12:11 am in reply to: [Resolved] How to hide “Required fields are marked *” in WP blog comments #46816
Thanks Brajesh,
I applied that CSS, it removed the blue asterisks but not the text “Required fields are marked”.
Anything else I can do to remove that text?
- Michael on October 6, 2022 at 2:24 pm in reply to: [Resolved] How to hide “Required fields are marked *” in WP blog comments #46804
Thanks Brajesh,
I updated WP from 5.5 (approx.) to 6.0.2, then those unwanted text/asterisks appeared.
Theme is Twenty Sixteen.
- Michael on August 30, 2022 at 10:37 am in reply to: [Resolved] BuddyPress Notify Post Author on Blog Comment , modification possible? #46241
Thanks very much Brajesh, I appreciate your generous assistance.
- Michael on August 29, 2022 at 12:14 pm in reply to: [Resolved] BuddyPress Notify Post Author on Blog Comment , modification possible? #46211
Hi Brajesh,
thanks, to clarify: I want authors to receive on-site notifications about comments on their posts, but Admin should NOT receive on-site notifications about comments on his (Admin’s) posts.
So I want to opt-out Admin from the functionality of your plugin.
The Dashboard>Settings>Discussion option refers to email notifications, I believe. So I don’t think that will help.
Current behavior after activating plugin:
– Authors receive on-site notifications about comments on their posts (great!)
– Admin receives on-site notifications about comments on his own posts (not desired)Thanks.