Forum Replies Created
-
AuthorPosts
-
Way Leong
ParticipantHi,
I am encountering the same issue as Pat. I was renaming my Custom Post Group Name Title without touching the ID but my CPTs went missing, but the DB still saves the data.
This is a bit frustrating as it happened to me a few times while renaming the title, has the problem been resolved?
April 14, 2023 at 1:16 PM in reply to: How to display deleted post in MB Frontend Submission Dashboard (Trash Section) #41490Way Leong
ParticipantHi Peter,
Sorry for repeating this over again but I promise this would be the last.
add_filter( 'rwmb_frontend_dashboard_query_args', 'my_frontend_dashboard_query_args' ); function my_frontend_dashboard_query_args( $args ) { $args['post_status'] = array( 'publish', 'trash' ); // Include trashed posts in the query return $args; } add_filter( 'wp_trash_post_status', 'my_trash_post_status', 10, 2 ); function my_trash_post_status( $trash_status, $post ) { $allowed_post_types = array( 'post','newsroom', 'property', 'leadership', 'company' ); // Set allowed post types if ( in_array( $post->post_type, $allowed_post_types ) ) { $trash_status = 'auto-draft'; // Set trashed posts to auto-draft status } return $trash_status; } add_action( 'rwmb_frontend_after_delete_post', 'my_frontend_restore_post_status', 10, 2 ); function my_frontend_restore_post_status( $post_id, $post ) { if ( $post->post_status === 'trash' ) { $allowed_post_types = array( 'post','newsroom', 'property', 'leadership', 'company' ); // Set allowed post types if ( in_array( $post->post_type, $allowed_post_types ) ) { wp_update_post( array( 'ID' => $post_id, 'post_status' => 'draft' ) ); // Restore trashed posts to draft status } }I tried to enable allowed edit for deleted post but the code doesn't seem working and it will still the same as this photo (https://prnt.sc/krDt4y39ovz8). Could you guide me on which PHP function is the correct one to allow deleted post to be edit?
April 12, 2023 at 4:56 PM in reply to: How to display deleted post in MB Frontend Submission Dashboard (Trash Section) #41455Way Leong
ParticipantHi, I applied the following php code into code snippets
<?php add_filter( 'rwmb_frontend_dashboard_query_args', 'my_frontend_dashboard_query_args' ); function my_frontend_dashboard_query_args( $args ) { $args['post_status'] = array( 'publish', 'trash' ); // Include trashed posts in the query return $args; } add_filter( 'wp_trash_post_status', 'my_trash_post_status', 10, 2 ); function my_trash_post_status( $trash_status, $post ) { $allowed_post_types = array( 'post','newsroom', 'property', 'leadership', 'company' ); // Set allowed post types if ( in_array( $post->post_type, $allowed_post_types ) ) { $trash_status = 'auto-draft'; // Set trashed posts to auto-draft status } return $trash_status; }It does display the trashed post on the Frontend dashboard, but I am unable to edit the post even my user role is Admin. You may view the image here (https://prnt.sc/krDt4y39ovz8)
I applied this code to let the trashed post status to become auto-draft status
if ( in_array( $post->post_type, $allowed_post_types ) ) { $trash_status = 'auto-draft'; // Set trashed posts to auto-draft status } return $trash_status; }April 11, 2023 at 9:06 AM in reply to: [MB Frontend Submission] Post Management & User Dashboard delete post action #41421Way Leong
ParticipantThank you, love you guys
April 10, 2023 at 9:59 AM in reply to: [MB Frontend Submission] Post Management & User Dashboard delete post action #41402Way Leong
ParticipantHi Peter,
Thank you, I got it working by creating a field Group and apply the ID into the builder (https://prnt.sc/ZOCjigIf8_U9)
The delete icon do displayed
(https://prnt.sc/U0TsxWjpaVYG)What if I don't have any custom field to add for the frontend submission, only need 'title & content', how can I still show the 'delete' icon? Or it is necessary to set up a field group even though there is no custom fields in the field group?
April 8, 2023 at 6:29 PM in reply to: [MB Frontend Submission] Post Management & User Dashboard delete post action #41394Way Leong
ParticipantThe frontend form attribute is using the latest UI build by your team for Bricks Builder
The post_fields are set fot thumbnail, title, excerpt & content
https://prnt.sc/zeIbXonUmG-EBut it still does not show the trash icon
November 27, 2021 at 3:08 PM in reply to: ✅Post types not displaying on WordPress Admin Panel #32193Way Leong
ParticipantThank you!
Way Leong
ParticipantI am using the latest beta version of Oxygen Builder (3.9 Beta 1), you need to make sure the frontend form shortcode, for my case
[mb_frontend_form id='details-of-the-company' post_fields='title,content' edit_page='company' allow_delete="true" edit="true" ajax="true"]are inserted in the Guternberg editor. Although it does display the dashboard on frontend. But I couldn't see any post details on the dashboard.
Way Leong
ParticipantI'm using Oxygen Builder too to display my dashboard.
The Dashboard will be displayed if the shortcode is inserted in the Guternberg editor to fix the issue not displaying.
However, with the dashboard being able to display on the frontend. Another issue arise, where the dashboard did not show any posts that is created by the admin nor users. The Oxygen Builder displays an uncaught error. Kindly refer to the screenshot below
Do we have to wait for Oxygen Builder Development Team to fix the issue or is there any other workaround that can be done? Thanks
Way Leong
ParticipantIt happened to me too, I am using Oxygen Builder 3.9 Alpha 1, a custom field group was created where it was grouped with other subcategories of text area, by ticking the admin column checkboxes the data does show up however it appear as "array"
-
AuthorPosts