WordPress.org

Ready to get started?Download WordPress

Forums

Types - Custom Fields and Custom Post Types Management
I cant display fields of the child posts (1 post)

  1. queimel
    Member
    Posted 1 year ago #

    Well, let me explain this:

    I cant display the child posts fields when i use a certain type of query. I use this query, to have more control of the loop, and display the child posts in ASC order:

    $childargs = array(
    'post_type' => 'recorridos-items',
    'numberposts' => -1,
    'orderby' => 'ID',
    'order' => 'ASC',
    'meta_query' => array(array('key' => '_wpcf_belongs_recorridos-pag_id', 'value' => get_the_ID()))
    );
    
    $recorridos = get_posts($childargs);
    foreach ($recorridos as $recorrido) {
    }

    When i use this query, the child posts fields simply not appear.

    Instead, when i use the normal way of querying the child posts, it works perfectly, and show all the fields

    $recorridos = types_child_posts('recorridos-items');
    foreach ($recorridos as $recorrido) {
    }

    But, i need to display the child posts in ASC order. There is another way to display the child posts in ASC order and display the child posts fields?
    I really need help to ressolve this issue! thanks!

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic