How to re-arrange the meta desciption items


Hello, currently the post meta are arranged in this que "post date", "author name", "leave a comment link" ... How I can re arrange them in the following order "author name", "post date", "leave a comment link"

Thanks in advance


You can do it by changing the default priority with a filter. Lowest priority will run first.

add_filter( 'beans_post_meta_items', 'example_sort_meta_items' );
/*
 * Sort meta items. (filter)
 */
function example_sort_meta_items( $meta ) {

  $meta = array (
     'author'   => 10, // priority
        'date'     => 20, // priority
        'comments' => 30  // priority
    );

    return $meta;

}

Jozi B@@ WOW!!! thanks man ... I love it ...


Write a reply

Login or register to write a reply, it's free!