• i’m using “types plugin” creating child related posts with the main ones.
    and trying now to re-order these posts according to ‘meta_value’ but it does nothing!

    here is my code:

    <?php
        $child_posts = types_child_posts('features', array('order' => 'DESC', 'meta_key' => 'order', 'orderby' => 'meta_value meta_value_num', 'suppress_filters' => true )) ;
        foreach ($child_posts as $child_post) {
    		echo $child_post->fields['order'];
    		echo '<h4>'.$child_post->post_title.'</h4>';
         }?>

    'order' or 'wpcf-order'
    not working and cause a blank page!

    any ideas ?

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi John did you manage to every get this right? im stuck at this same point, and any help would be much appreciated.

    Thread Starter John Mido

    (@h3o-co)

    Sorry waynmeyer couldn’t find any way to make it work even the plugin’s support didn’t help!
    mostly the function ‘types_child_posts’ does not support orderby .
    I turned over that through adding a number in beginning of the title and hide it using css ‘text-indent’ , as the function sorting alphabetically. It’s not a very practical solution but it may help if you have a small number of posts!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘re order custom query by meta_value’ is closed to new replies.