Front end dashboard fails to load custom post type

Support MB Frontend Submission Front end dashboard fails to load custom post typeResolved

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #33078
    Nicholas CoxNicholas Cox
    Participant

    Hi

    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

    #33092
    Long NguyenLong Nguyen
    Moderator

    Hi,

    You need to add the attribute post_type and 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"]
    
    #33096
    Nicholas CoxNicholas Cox
    Participant

    hi

    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-dashboard

    #33099
    Long NguyenLong Nguyen
    Moderator

    Hi,

    That means on the page that has the shortcode frontend submission, you need to add the post_type attribute, not the shortcode frontend dashboard. Refer to the documentation https://docs.metabox.io/extensions/mb-frontend-submission/#shortcode-attributes

    #33100
    Nicholas CoxNicholas Cox
    Participant

    sorry i am confused. So I cannot use the dashboard edit screen for custom post types?
    [mb_frontend_dashboard edit_page="256"]

    e.g.
    https://i.imgur.com/LxPh4xH.png

    #33110
    Long NguyenLong Nguyen
    Moderator

    Hi,

    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-slug with your post type slug. Refer to this topic https://support.metabox.io/topic/dashboard-not-working/#post-29143

    Let me know how it goes.

    #33131
    Nicholas CoxNicholas Cox
    Participant

    Ah 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"]

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.