New answers tagged id
u tried using: global $post; $postid = $post->ID; the $post contains data from the current post or page EDIT: for more info see codex : http://codex.wordpress.org/Function_Reference/$post. also i think i may have misunderstood your question, are u after: <?php global $wp_query; $postid = $wp_query->post->ID; // get user value and ...
The values assigned to $user_set_value should be stored somehow in some form, usually an option. You will know how the values and where the values are stored. It is easy then from there $user_set_value = get_some_saved_option_value(); $args = array( 'page_id' => $user_set_value ); $q = new WP_Query( $args ); Just change ...
Check out get_users(): $subscriber_ids = get_users( array( 'fields' => 'ids', 'role' => 'subscriber', ) ); foreach ( $subscriber_ids as $id ) echo "$id<br />";
Top 50 recent answers are included