- This topic has 6 replies, 2 voices, and was last updated 2 years, 1 month ago by .
I want to filter a Post Select with the actually author...
array( 'name' => 'Firma auswahlen', 'id' => 'trainer_firma', 'type' => 'post', // Post type. 'post_type' => 'per_trainer_firmen', // Field type. 'field_type' => 'select_advanced', // Placeholder, inherited from <code>select_advanced</code> field. 'placeholder' => 'Firma auswahlen', // Query arguments. 'query_args' => array( 'post_status' => 'publish', 'posts_per_page' => - 1, 'author' => ???authorID???, ), ),
'query args' for author... If I try to write 'author' => 1, works fine... But I want to do this for any Authors...
I think: get_current_user_id();
But this is not working...
can you help me?
- You must be logged in to reply to this topic.