Custom Fields
Re-Envisioned
Support MB Frontend Submission Front end dashboard fails to load custom post type

  • Creator
    Topic
  • #33078
    Resolved Nicholas 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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #33092
    Long 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 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 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 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.

    View post on imgur.com

    #33110
    Long 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://metabox.io/support/topic/dashboard-not-working/#post-29143

    Let me know how it goes.

    #33131
    Nicholas 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 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.