• Resolved bellawhite

    (@bellawhite)


    Is there a way that users can delete and also if possible modify their posts from the frontend ?
    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello @bellawhite,

    Yes, users can delete and edit their posts from the frontend. In order to allow your users to do that, you need to go through the following steps:

    1. Please check the screenshot, you need to set the edit page from your WP-admin > WPUF > Settings > Frontend posting > Edit page.

    2. Next you have to allow your users to be able to edit and delete their posts by navigating through WPUF > Settings > Dashboard > Users can edit post and Users can delete post – set these to yes. Please check the screenshot.

    If you have already faced the above two options, but the issue still exists, it is possible that the issue can be your site-specific and needs to be checked directly from your site. This platform doesn’t allow us to request permission for site checking therefore you need to contact us.

    Regards,

    Thread Starter bellawhite

    (@bellawhite)

    Thank you for the answer ! But the problem is that I decided for the users to not have the dashboard, so they won’t see the button to edit or delete a post. Is there a way to have a button on the posts or elsewhere ?
    Thanks.

    Hello @bellawhite,

    Do you want to show custom post type posts from the account page so that your users can edit/delete from the account page directly?

    Let me know.

    Regards,

    Thread Starter bellawhite

    (@bellawhite)

    Yes exactly.
    Is there a way to do that ?

    • This reply was modified 5 years ago by bellawhite.

    Hello @bellawhite,

    Yes, you can do that by adding the following custom code in your child theme’s functions.php file:

    Say you want to show the product type posts on the account page, so adding the following code will show a label named “Products” where users can edit/view/delete their product type posts.

    add_filter( 'wpuf_account_sections', 'wpuf_my_page' );
    
    function wpuf_my_page( $sections ) {
    $sections = array_merge( $sections, array( array( 'slug' => 'my-page', 'label' => 'Products' ) ) );
    
    return $sections;
    }
    
    add_action( 'wpuf_account_content_my-page', 'wpuf_my_page_section', 10, 2 );
    
    function wpuf_my_page_section( $sections, $current_section ) {
    
     echo do_shortcode('[wpuf_dashboard post_type="product"]');
    
    }
    

    If you want to show any other custom post type posts just change the post_type=”” in the function wpuf_my_page_section() and the ‘label’=> ” in the function wpuf_my_page() as you need.

    Regards,

    Anticosti

    (@anticosti)

    @611shabnam Hey! Thanks a bunch for this very useful snippet.
    You made my day. ??

    Hello @anticosti,

    No problem. We are more than happy to help you out.

    Regards,

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Deleting Post from frontend’ is closed to new replies.