Hi Brajesh
I’d like to get rid of the (all) posts (posts.php) tab because I think it’s confusing for users to have a list of all their posts without any indication as to whether they’re published, pending, drafts etc.
Unfortunately, when I do that, clicking on the top level tab (in my case “Blog”) means that no data is shown if/until one of the sub tabs is selected ie. mysite/members/me/blog would normally show the posts.php template but since that’s hidden, nothing is shown until the user selects mysite/members/me/blog/published etc.
Of course, one way to override this would simply to add the status criteria eg. status =>’published’ to the posts.php template but I’m just wondering if there’s a better way?
Please don’t let this query keep you from that next release, but if you have a moment and any thoughts, they would be much appreciated.
Regards
NikHi Nik,
Thank you for reporting.
to be honest, we did it intentionally. To avoid complexity, we have forced ‘posts lists’ to be default tab. For the users who don’t want this, can change the behaviour.Here is a line of code to allow using published as the default tab.
// sets the Published tab as the default tab for all post types // 'published' is not a slug, it is tab identifier, please DO NOT change it with your slug. add_filter( 'bblpro_default_landing_sub_tab', function ( $action, $post_type ) { return 'published'; }, 10, 2 );
Regards
BrajeshHi Brajesh
Thank you so much and that works perfectly for personal posts.
I thought I could use simialr for group posts by substituting bblpro_default_landing_sub_tab for bblgroups_default_landing_sub_tab in the above code, but for some reason, this doesn’t seem to be working ie. no default tab is set. Any idea why this might be?
Of course, the other problem with group posts is that (as I believe you’re aware) there is currently no way of hiding the Posts tab for ALL groups but I’m hoping that particular issue may perhaps be fixed in the next release?
Do you have any idea when the next update might be available?
With so many thanks as always.
NikHi Nik,
Thank you for the reply.
I am sorry, the strategy won’t work with current version of BuddyBlog group.I am releasing the update this Wednesday and will share the code for the same after that.
Regards
Brajesh
You must be logged in to reply to this topic.