WordPress.org

Ready to get started?Download WordPress

Forums

Types - Custom Fields and Custom Post Types Management
Error when using types_child_posts() (10 posts)

  1. gvancout
    Member
    Posted 1 year ago #

    After updating towards Types version 1.2 all instances of types_child_posts('post-type'); stopped working. Returning towards version 1.1.3.4 fixed the problem

    http://wordpress.org/extend/plugins/types/

  2. sophos
    Member
    Posted 1 year ago #

    The solution for 1.2 is to add:

    if( !function_exists( 'wpcf_admin_add_js_settings' ) ) {
        require_once WPCF_EMBEDDED_ABSPATH . '/admin.php';
    }

    into /wp-content/plugins/types/embedded/includes/conditional-display.php

    just before string

    wpcf_admin_add_js_settings( 'wpcfConditionalVerifyGroup',
            wp_create_nonce( 'cd_group_verify' ) );

    (it is line 32 at the moment)

  3. AmirHelzer
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for reporting the problem and a solution. We'll get it fixed.

  4. Srdjan
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks, fix is added.

  5. NeilThomas2112
    Member
    Posted 1 year ago #

    Thank you so much for fixing this, I have been pulling my hair out all night.. I was on the forum and no one had the solution will post to the forum. Thanks.

  6. benschell
    Member
    Posted 1 year ago #

    Fixed like a new version is soon to be published? Or the existing v1.2 zip has been adjusted?

  7. curiouspeterson
    Member
    Posted 1 year ago #

    I am using Types v1.2.2 and types_child_posts('post-type'); does not work.

    $child_posts = types_child_posts(‘recipe’);
    foreach ($child_posts as $child_post) {
      echo $child_post->post_title;
    }

    If I call the code in the parent's single post page nothing is returned

    Is anyone else having this problem?

  8. curiouspeterson
    Member
    Posted 1 year ago #

    also I am using WordPress 3.5.1.

  9. curiouspeterson
    Member
    Posted 1 year ago #

    Returning to version 1.1.3.4 fixes the problem but is undesirable

  10. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Curiouspeterson,

    Please make sure you have sets post_type to single name e.g. 'post', 'child'

    [ Signature moderated. ]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags