Hi Ravi,
Thank you, I had already done that, what I was asking was the number of posts that you can see next to BubbyBlog Tab in user profile tabs.
Check this image please http://i.imgur.com/4VooYU6.jpg
Thank you,
LeoHi Leo
Please clone the latest code for buddyblog form the following link ‘https://github.com/sbrajesh/buddyblog’ and after cloning the latest code then try the following code in your bp-custom.php file
add_filter( 'buddyblog_visible_posts_count', 'buddyblog_visible_count', 10, 2 ); function buddyblog_visible_count( $total_posts, $user_id ) { $query_args = array( 'author' => $user_id, 'post_type' => buddyblog_get_posttype(), 'post_status' => $status, 'category__in' => array(65), //category ids 'fields' => 'ids', 'suppress_filters' => false ); $posts = new WP_Query( $query_args ); $total_posts = $posts->found_posts; return intval( $total_posts ); }
Thank You
RaviHello Ravi,
I am back again, there’s another problem here. Can you please have a look?
When you publish a post (all works well here), the post is published under the category 65. I have a loop to show only these posts there.
Later if you want to edit the post, opens the url like this: site.com/members/member-name/buddyblog/edit/
like the general posts from buddyblog published under another category.
The problem is when you make the changes and submit the form, the post changes the category and it is being listed in the main loop.Is there any way to open another form for editing the post, the same form that we use to publish it?
Thank you,
LeoHi Leo,
I am Sorry for the delayed reply.
Most probably the BuddyBlog settings are conflicting with our custom code(single we are using the BuddyBlog edit form to update).We will need to use a different edit/add new form. So, you will need to add an endpoint for that. Do you want me to provide code for it ?
Thank you
Ravi
The topic ‘ [Resolved] BP Simple Front End Post Form’ is closed to new replies.