Hi Buddypress heroes,
I’m trying to set up the buddyblog front end plugin.
I installed the plugin then I tried to follow the following explanations : https://buddydev.com/plugins/bp-simple-front-end-post/ ,
As far I got the explanation I went to bp-simple-front-end-post.php to add the
function my_post_form() {
$settings = array(
‘post_type’ => ‘post’,
//which post type
‘post_author’ => bp_loggedin_user_id(),
//who will be the author of the submitted post
‘post_status’ => ‘draft’,
//how the post should be saved, change it to ‘publish’ if you want to make the post published automatically
‘current_user_can_post’ => is_user_logged_in(),
//who can post
‘show_categories’ => true,
//whether to show categories list or not, make sure to keep it true
‘allowed_categories’ => array( 1, 2, 3, 4 )
//array of allowed categories which should be shown, use get_all_category_ids() if you want to allow all categories
);$form = bp_new_simple_blog_post_form( ‘my form’, $settings );
//create a Form Instance and register it
}before the
add_action( ‘bp_init’, ‘my_post_form’, 4 );//register a form
then I get I need to put somewhere (template?) :
$form = bp_get_simple_blog_post_form( ‘my form’ );
if ( $form ) {//if this is a valid form
$form->show();//it will show the form
}I though I needed to put it in the file edit.php in the Buddyblog’s template folder but I fund the following code already written :
<?php if ( function_exists( ‘bp_get_simple_blog_post_form’ ) ): ?>
<?php
$form = bp_get_simple_blog_post_form( ‘buddyblog-user-posts’ );$form->show();
?>
<?php else: ?>
<?php _e( ‘Please Install BP Simple Front End Post Plugin to make the editing functionality work.’, ‘buddyblog’ );?>
<?php endif; ?>which seems to me very similar to what I should put
Obviously it’s not working and no form appears when I’m clicking on the “new post” button on the “member” page .
Can someone help me with this ? What do I do wrong ?
With the little knowledge I have I thing there is an issue calling the bp_get_simple_blog_post_form function in the edit.php from the bp-simple-front-end-post.php.
It may seems obvious for any developer out there but I’m not one and I deeply need my user to be able to post blog posts by themselves in their member page.
Many thanks!
Alex
Ps: WP version 4.8.1
Buddyblog version 1.1.9
Buddypress version 2.9.1
BP Simple Front End Post version 1.3.1
Theme : Salient version 8.1.0Hi Alexandre,
My apologies for the confusion.If your only goal is to use Bp Simple Front End post with BuddyBlog, you do not need to modify anything.
Al you need to do is install and activate both the plugins. Please remove the custom code that you have added(or download a fresh copy).
Once done, please visit Settings->BuddyBlog to fine tune the BuddyBlog settings.
Hope that helps.
PS: The code is an example to show how to use BP Simple Front End post with other plugins/code.
Hi Brajesh!
Thank you for your message, I was rushing into the code for no reason.
Actually what I needed to change in the buddyblog settings were the “capabilities” to edit or create posts. I switched them following those instructions :
https://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table
from “read” to “edit_users”
all good now, the form appears
Many thanks,
Alex
Hi Alex,
Thank you for confirming.I am glad it is working for you 🙂
Regards
Brajesh
The topic ‘ [Resolved] Buddyblog simple front end posting installation for dummies’ is closed to new replies.