Support

Account

Forum Replies Created

  • Hmm, not sure how to change my code in order to use those examples.. Could you alter this code?

    <?php
    $args  = array(
    'meta_key' => 'antallningsdatum',
    'orderby' => 'meta_value_num',
    'order' => 'DESC'
    );
    $author_query = new WP_User_Query( $args );
    $authors = $author_query->get_results();
    $user_id = get_the_author_meta('ID');
    foreach( $authors as $author ):
    
    echo '<li class="anstallningsdatum">'. get_the_author_meta( 'antallningsdatum', $author->ID ).'</li>';
    
    ;?>
    <?php endforeach;?>
  • Works!

    Except it is get_the_author_meta not get_author_meta 🙂

    Thanks!

Viewing 2 posts - 1 through 2 (of 2 total)