Replies
- Brajesh Singh on January 11, 2018 at 12:40 am in reply to: [Resolved] Adding a gallery automatically on post creation #12818
Wow, That’s great George.
Congratulation on the first plugin. All the best 🙂Should we mark this topic as resolved now?
Regards
Brajesh - Brajesh Singh on January 11, 2018 at 12:38 am in reply to: [Resolved] Buddyblog: Hide certain Categories and Tags #12817
Hi PresPhuture,
Since Ravi seems to be away, I will assist here.,Please put the following code in your bp-custom.php
/** * Only show BuddyBlog tabs if a user is author or above. */ function buddyblog_custom_remove_profile_nav() { if ( ! bp_is_user() || user_can( bp_displayed_user_id(), 'publish_posts' ) ) { return; } bp_core_remove_nav_item( 'buddyblog' ); } add_action( 'bp_buddyblog_setup_nav', 'buddyblog_custom_remove_profile_nav' ); /** * Remove from adminbar too for BuddyBlog. */ function buddyblog_custom_remove_admin_nav( $nav_items ) { if ( ! current_user_can( 'publish_posts' ) ) { $nav_items = array(); } return $nav_items; } add_filter( 'bp_buddyblog_admin_nav', 'buddyblog_custom_remove_admin_nav' );You may adjust the capability further if you wnat in future.
Regards
Brajesh - Brajesh Singh on January 11, 2018 at 12:21 am in reply to: BuddyPress Extended User Groups Widget #12814
Hi Cecile,
Can you please post your modified code on pastebin?Thank you
Brajesh - Brajesh Singh on January 11, 2018 at 12:20 am in reply to: BuddyPress Signup Avatar plugin crop problem #12813
Hi Ecet,
Welcome to BuddyDev.The plugin needs update to work with current version of BuddyPress. We will need some time before we can provide you an update.
Thank you
Brajesh - Brajesh Singh on January 10, 2018 at 8:52 pm in reply to: [Resolved] Adding a gallery automatically on post creation #12812
Congratulations.
Please do link me when you push the code 🙂About the code:-
$typenow is fine but it tell you more or less about the editing screen and not exactly about the post type being saved.In our case, we were saving 2 entries(1 for custom post and another for gallery post type). For both, the $typenow remained same as the second post(gallery) creation was triggered programatically. Using get_post_type( $post_id) gave us the current post being saved’s post type.
Hope that clarifies.
Regards
Brajesh - Brajesh Singh on January 10, 2018 at 8:41 pm in reply to: [Resolved] Adding a gallery automatically on post creation #12810
Hi George,
Please try changing this lineif ( $typenow == 'buslsite' ) {to
if ( get_post_type( $post_id ) == 'buslsite' ) {That should do it.
- Brajesh Singh on January 10, 2018 at 8:40 pm in reply to: [Resolved] Recent Visitors For BuddyPress Profile #12808
You are welcome!
- Brajesh Singh on January 10, 2018 at 8:22 pm in reply to: [Resolved] Adding a gallery automatically on post creation #12805This reply has been marked as private.
- Brajesh Singh on January 10, 2018 at 8:21 pm in reply to: [Resolved] Recent Visitors For BuddyPress Profile #12804
Hi,
I knew that would happen, That’s why I said to set some width.For example, if you have set the avatar size as 10 in the backend, you should set it as
.buddypress div#item-header .recent-visitors img.avatar { width: 10px; }Do you wnat the round avatars?
If yes, you can add this line below the width like
.buddypress div#item-header .recent-visitors img.avatar { width: 10px; border-radius: 50%; }and so on.
Please let me know what do you want it to look like and I can help with the css.Regards
Brajesh - Brajesh Singh on January 10, 2018 at 8:02 pm in reply to: [Resolved] Adding a gallery automatically on post creation #12800
Hi George,
In your code, It seems to me you are using update_post_meta with gallery id.You are correct that you should not add custom fields for the post types which were not specific to your own implementation.
Regards
Brajesh