I have a custom post called event and I have to show all the authors who have added the post. I have tried the below code but I am getting all the users on the page. For example. There are 4 users called A, B, C, and D on the website and A and B added the post. Now I have to get only A and B users but below code getting all the users like A,B,C,D Any idea how …
I want to add a custom column in the User list in the WordPress admin dashboard with a custom action to perform. It means in the custom column, I want to add a button for each user. While clicking the button, it will redirect to a new page link with user_id. How can I achieve this?
i want to get authentication to my website like to be the page with name and password as a file reference to log in as visitor with detected authorization to each person want to visit the website how i can set up the file user to check in and how can give authorization to each one can access .
I'm trying to set up co-authors plugin in order to show articles authors function inl_users() { if ( function_exists( 'get_coauthors' ) ) { $coauthors = get_coauthors(); //array_shift($coauthors); foreach ( $coauthors as $coauthor ) { $autArray[] = '<a href=' . get_author_posts_url( $coauthor->ID ) . '>' . $coauthor->display_name . '</a>'; echo implode(", ", $autArray); } } The first author is shown twice in the first element, like this: for $autArray = (John Smith, Joe Blogs); it returns John SmithJohn Smith, Joe Blogs …
How could i get List of all the Authors? author.php file shows the Information about Individual Author. for example: http://domain.com/author/bj that returns the Bj's Profile. if i enter http://domain.com/author it returns 404 Not Found Author page shows author's avatar, Author's Name and description. how can i list out all the authors? Need Help!
i am using the wp_list_authors function as the following: <?php wp_list_authors( array( 'show_fullname' => 'true', 'orderby' => 'display_name', 'order' => 'ASC' )) ?> However this shows the authors by firstname + lastname I want to switch that so it shows the users lastname + firstname. I cant figure out how can i use the get_user_meta in the function. It is possible or should I use something else than wp_list_authors?
How can i achive that? I found count_user_posts and get_users, but how would I merge them into the desired result? Do I really have to use a WP DB Query?
Question I want to display total number of Authors and total number of subscribers on the blog but exclude the admin in this way: 56 Authors so far 15 Subscribers so far Code that is close to what I need :) I have this code and it displays the total number of everybody that is registered. I need it to display authors and subscriber roles separately. Please help :) <?php $users = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users"); echo $users." members so …
I am using this code to only get authors who have posted in the 'Travel' category but the part 'category_name' => 'travel' doesn't seem to work. The code currently gets all posts in all categories. <?php $args = array( 'exclude' => array( 10, 18 ), 'role' => 'contributor', 'category_name' => 'travel', ); $wp_user_query = new WP_User_Query($args); $authors = $wp_user_query->get_results(); if (!empty($authors)) { foreach ($authors as $author) { if ( count_user_posts($author->ID) >= 1 ) { } } }
I'm looking for a way to retrieve all authors with their avatar. I know there is a way to get an authors avatar but I want to get all avatars of all the authors :) echo get_avatar(get_the_author_meta('ID'), '160'); I tried to combine this command with wp_list_authors() but didn't find a way. How can I retrieve a list of all authors with their avatars? Thank you!
I have created a list of my contributors for my website it works well. I'm trying to do this with a shortcode in my functions.php. The list appears well. But when I want to place it in my theme in any page, it appears before the content whereas I want it to be at the bottom of the page of its appropriate page template. I can't seem to find my mistake function comite_shortcode( $atts ){ $contributor_member = array( 'role' => …
I want to list all unique authors that have posts in the current category. My code (location: wp-content/themes/custom-theme/category.php) <div class="container"> <div class="row"> <?php if ( have_posts() ) : ?> <?php while( have_posts() ) : the_author(); ?> <div class="col-md-2 text-center"> <?php the_author_meta( 'display_name', 30 ); ?> </div> <?php endwhile; ?> <?php else: ?> <p class="text-center">No authors</p> <?php endif; ?> </div> </div> This is not giving expected result, can someone help me?
On my company's website, there is a blog page which displays blogs of all team members. I want to create an author link below each blog which takes to the author individual page and this page displays their profile pic, bio and blogs they have written till date. I am using Uncode theme. There is author module in it. I tried using it but it doesn't show different authors. It shows only current logged in user as author. This is …
I'm trying to show the authors social medias on the page but they aren't showed at all. Here is the code that I have so far $website = $user->user_url; if($user->user_url != '') { printf('<a href="%s">%s</a>', $user->user_url, '<i class="icon-home"></i>'); } $twitter = get_user_meta($user->ID, 'twitter_profile', true); if($twitter != '') { printf('<a href="%s">%s</a>', $twitter, '<i class="icon-twitter"></i>'); } $facebook = get_user_meta($user->ID, 'facebook_profile', true); if($facebook != '') { printf('<a href="%s">%s</a>', $facebook, '<i class="icon-facebook"></i>'); } $google = get_user_meta($user->ID, 'google_profile', true); if($google != ''){ printf('<a href="%s">%s</a>', $google, …
The following is my code: (klcom is my theme name) I just show the author by: name and description, I want to show the author's last 3 post with tile after each author, How can I code? Thanks <ul class="klcom-user-list user-cols-<?php echo $cols;?>"> <?php foreach ( $users as $user ){ $cover_photo = klcom_get_cover_url( $user->ID ); $group = klcom_get_user_group( $user->ID ); ?> <li class="klcom-user-item"> <div class="klcom-user-cover"><?php echo klcom_lazyimg($cover_photo, $user->display_name);?></div> <div class="klcom-user-avatar"> <a class="avatar-link" href="<?php echo get_author_posts_url( $user->ID );?>" target="_blank"> <?php echo …
I have custom fields in the user profile that displays in the team page. It reads "director" "researcher" "graduate" "intern" and some others. When adding a new team member, you pick from a select box with the options. Right now the page displays the users in date of creation order but I need to show them in hierarchy order (all directors first, then the researchers, then graduate, etc, etc). The new fields for the profile are in functions.php with the …
I am using wp_list_authors, to, how function name says, make a list of authors, but i want to show only "Authors". Now in my site, any account who publish a text ("Admin", "Editor") show his name in my list of authors, but i want ONLY users who are Authors. How can i make this happen? My code now <?php $args = array( 'orderby' => 'name', 'order' => 'ASC', 'number' => 6, 'optioncount' => true, 'exclude_admin' => true, 'show_fullname' => false, …
I'm trying to create an users list to sort all users by the highest post views for each user, I added $output = array_slice($topuser, 0, 10); to get 10 users when i click load more in the next page, but this is repeating the first 10 users only! After searching i found is need to add $paged and $offset to get the next page for the next users! But sorry, I don't know how :( I'm highly appreciated your time …