• snookian

    (@snookian)


    Hi, I am struggling to create a drop down list of co_authors I have a dropdown lost for wordpress users like below but need to incorporate it with co_authors. Any ideas?

                  <?php		  
                    $args2 = array(
                        'show_option_none' => __( 'Select Author' ),
                        'name'             => 'author', // string
                        'show_count'       => 1,
                        'orderby'          => 'display_name',
                        'show'             => 'display_name',
                        'echo'             => 0,
    		    'who'	       => 'authors',
                    );
                    $select2  = wp_dropdown_users( $args2 );
                    $replace2 = "<select$1 onchange='return this.form.submit()'>";
                    $select2  = preg_replace( '#<select([^>]*)>#', $replace2, $select2 );
                    echo $select2;
                  ?>
    • This topic was modified 8 years ago by snookian.
  • The topic ‘Dropdown list’ is closed to new replies.