Front end dashboard fails to load custom post type
Support › MB Frontend Submission › Front end dashboard fails to load custom post typeResolved
- This topic has 6 replies, 2 voices, and was last updated 3 years, 12 months ago by
Nicholas Cox.
-
AuthorPosts
-
January 9, 2022 at 12:50 AM #33078
Nicholas Cox
ParticipantHi
I have created a page and placed the following shortcode
[mb_frontend_dashboard edit_page="256"]I have checked and have 3 custom post types with the author of admin. But when i go to the page there are 0 posts. Any ideas why?
Also I have tested the default 'post' type in WordPress the shortcode displays the post successfully. So it seems to be an issue just with custom post types?
Thanks
January 9, 2022 at 7:02 PM #33092Long Nguyen
ModeratorHi,
You need to add the attribute
post_typeand assign the post type slug in the frontend submission shortcode to edit this post type on the frontend dashboard page.[mb_frontend_form id="meta-box-id" post_fields="title,content" post_type="cpt-slug"]January 9, 2022 at 7:58 PM #33096Nicholas Cox
Participanthi
Ok thanks, im not using the 'mb_frontend_form id'
im using the [mb_frontend_dashboard] shortcode
[mb_frontend_dashboard edit_page="256"]
there is no option to target the post type in the documentation https://docs.metabox.io/extensions/mb-frontend-submission/#user-posts-dashboardJanuary 9, 2022 at 10:00 PM #33099Long Nguyen
ModeratorHi,
That means on the page that has the shortcode frontend submission, you need to add the
post_typeattribute, not the shortcode frontend dashboard. Refer to the documentation https://docs.metabox.io/extensions/mb-frontend-submission/#shortcode-attributesJanuary 9, 2022 at 10:14 PM #33100Nicholas Cox
Participantsorry i am confused. So I cannot use the dashboard edit screen for custom post types?
[mb_frontend_dashboard edit_page="256"]January 10, 2022 at 8:39 AM #33110Long Nguyen
ModeratorHi,
Yes, it is possible to use the frontend dashboard to edit the custom post type. On the page with ID 256, you need to add the frontend submission shortcode
[mb_frontend_form id="meta-box-id" post_fields="title,content" post_type="cpt-slug"]Remember to change the
cpt-slugwith your post type slug. Refer to this topic https://support.metabox.io/topic/dashboard-not-working/#post-29143Let me know how it goes.
January 10, 2022 at 5:50 PM #33131Nicholas Cox
ParticipantAh ok so the shortcode only works when its used beside 'mb_frontend_form'. Well that's ok if I wanted the both forms to be on one page, but I want the user dashboard to be on its own page. So this solution wont work for me. Sorry I should have explained further.
I was assuming I could do something like this. With adding 'post_type="cpt-slug"'. But no worries, I will have to implement my own Dashboard.
[mb_frontend_dashboard edit_page="256" post_type="cpt-slug"] -
AuthorPosts
- You must be logged in to reply to this topic.