Support » Plugin: CC Child Pages » Show drafts of children and grandchildren

  • Resolved creativepassion

    (@creativepassion)


    If I choose to show draft pages (see third column on the page) it ignores children and grandchildren. It only shows parent pages which are drafts.

    Is there a way to fix this?

    PS Thanks for the awesome plugin!

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author caterhamcomputing

    (@caterhamcomputing)

    Can you post the full shortcode that you are using for this … I can then try and recreate the issue.

    Thank you.

    [child_pages post_status=”draft” siblings=”true” cols=”1″ skin=”simple” list=”true” depth=”5″ orderby=”title” order=”ASC” exclude=”465,12,6″]

    I have also tried:
    [child_pages post_status=”draft” cols=”1″ skin=”simple” list=”true” depth=”5″ orderby=”title” order=”ASC” exclude=”465,12,6″]

    [child_pages post_status=”draft” siblings=”true” cols=”1″ skin=”simple” list=”true” depth=”5″ order=”ASC” exclude=”465,12,6″]

    [child_pages post_status=”draft” siblings=”true” cols=”1″ skin=”simple” list=”true” depth=”5″ orderby=”title” order=”ASC”]

    Plugin Author caterhamcomputing

    (@caterhamcomputing)

    You are choosing to show ONLY posts that are drafts, is that correct?

    Are the children and grandchildren also drafts?

    Plugin Author caterhamcomputing

    (@caterhamcomputing)

    Looking at your page and the lists of published and draft pages next to where the shortcode is, I think you need to change the value of post_status to:

    post_status="publish,draft" or something similar (see the documentation for possible values).

    Let me know if this solves your problem.

    I’m trying to help my client to finalise/plan content.

    Column 1 = publish,private,draft
    Column 2 = publish
    Column 3 = draft
    Column 4 = private (pending)

    There should be nineteen draft pages showing in the third column, but there is only one page showing because it is a parent page. All the ones which aren’t displaying are children or grandchildren where their respective parent pages are not drafts.

    Plugin Author caterhamcomputing

    (@caterhamcomputing)

    This is not something that this shortcode is deisgned to do … it will show child pages of either the current page or a specified page that meet certain criteria. If the child of the selected page doesn’t meet the criteria, it will not be included and therefore any of it’s children will not be included.

    You would need to either create some kind of custom walker for wp_list_pages function (https://developer.wordpress.org/reference/functions/wp_list_pages/) used by the plugin or write some custom code using WP_Query (https://codex.wordpress.org/Class_Reference/WP_Query)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Show drafts of children and grandchildren’ is closed to new replies.