Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2 votes
0 answers
28 views

users followin the blog post author

I have a code which is supposed to follow the author of blog post but whenever the follow button is typed it gets an critical error on the wordpress. heres the script <?php // Get current user $...
heyyou's user avatar
  • 21
0 votes
0 answers
20 views

How to make the Post Author name fixed as "Editorial Staff" even if there are multiple authors?

I want the Post author's name to be fixed as "Editorial Staff" and not show the multiple authors' names. Can anyone assist me please?
Frankie's user avatar
  • 11
1 vote
1 answer
45 views

Whitelist Author of Private Post

Does anyone know of a way to whitelist the author of a private post so they never have to enter their password to access their own post on the frontend? If they are logged into the site, there must be ...
Aaron Wimberley's user avatar
0 votes
1 answer
82 views

Get all comments of author's posts

Hello I have multi author website. I want to display all comments of posts created by author in author page. Please help me. I found this code but fatal error <?php $args = array( '...
Teymur Abbasov's user avatar
0 votes
2 answers
294 views

Restricting displayed posts to posts from only select authors

Is there any hook or filter I can use programmatically to restrict posts displayed in the frontend archives and in the dashboard to posts only from specified author ID's? We've been getting a lot of ...
Tuzz Samuel's user avatar
1 vote
1 answer
1k views

Change post author without using wp_update_post()

The standard or more obvious way to change a post author in WP is to use the wp_update_post() function, as shown in this question. But I am having an issue, described as follows: // Inside the ...
Álvaro Franz's user avatar
0 votes
2 answers
335 views

Author post count in category

I want to count authors post count in a specific category. How do i do that? I have red this thread here but still can't fiure it out. Count number of posts by author in a category Edit: This is what ...
ANdy's user avatar
  • 47
0 votes
3 answers
720 views

(solved) getting post author's user role

we can use $user = wp_get_current_user(); if ( !in_array( 'administrator', (array) $user->roles ) ) to get the user role of the viewer. but i want to ignore who views. i want to get who writes ...
Abdullah Al Muaz's user avatar
0 votes
1 answer
74 views

Posts missing on author page

I run a news website and was editing the author page PHP. I think I accidentally deleted some code because now no posts show under any of the author pages. Here is my code: <?php if( ! ...
Robert Tann's user avatar
0 votes
0 answers
82 views

Change of author not updating

I've created at the bottom of a post a typical author box where I show author's avatar, name and description. It's showing the information correctly but if I change the post author to a different one, ...
Anta's user avatar
  • 29
0 votes
2 answers
475 views

Limit Post Creation Count by Author or Role

I need to limit the number of posts that can be created. I'd like any variation of total posts, posts per time period (month), by author (ID) or by role. off-the-shelf plugins found so far in the ...
Trip Vendors Inc's user avatar
0 votes
1 answer
42 views

Is it possible to lock all new and existing WordPress posts to one specific author?

I have a case where there will be multiple users writing, editing, and publishing posts. All these posts should always have the same user as the author, a catch-all user if you will. Is it possible ...
TASan's user avatar
  • 42
0 votes
0 answers
306 views

Display post by Random Authors on Page Refresh

I want to display post by random author's id, like this : <div class="css_class"> <div class="author_id"> author_name </div> <div id="post_author"> ...
mems's user avatar
  • 73
3 votes
2 answers
1k views

WP rest api returns 404 only when author param is used

I have a multisite wordpress installation on aws linux, working perfectly fine. The WP Rest api is also working exactly as it should. Except for one single case. /wp-json/wp/v2/posts?author=<some ...
Deepon GhoseRoy's user avatar
-1 votes
1 answer
345 views

How can I add Author's phone number to wp profile and make it appear in wp-admin/edit.php columns

How can I add Author's phone number to wp profile and make it appear in wp-admin/edit.php columns? Someone pls help me out with code or plugins link. Thank you.
Engr IBM's user avatar
3 votes
0 answers
233 views

How can I control multiple editing of wordpress posts?

I am managing multiple authors blog, I have issues of editors taking over the stories that someone else is currently editing. The default wordpress warning will display but some of them ignore it and ...
Engr IBM's user avatar
1 vote
1 answer
831 views

Retrieving Author ID in wp-admin area

Currently able to display the post author ID on the frontend with no difficulties. Returning the ID in /wp-admin when editing a post is proving to be tricky. Here's what I have so far: $...
Josh Calico's user avatar
-1 votes
2 answers
4k views

how to show all type of author posts in author page (SOLVED)

my site have multiple authors. I need to show all type of author posts in author page that if visitors can see all posts of author when visitied his profile page. this code <?php get_header()...
Ramin Mahmudov's user avatar
0 votes
1 answer
182 views

What permissions does a role need for the user to be assigned as the author of a post?

I have a Wordpress site with custom roles (except for administrator) and now wanted to create a role so that a user with this role can be manually assigned as the author of a post. I thus created a ...
Yato's user avatar
  • 17
0 votes
2 answers
17 views

How to get the ability to change the author of a post

Recently it has become impossible to change the author of any posts on my blog. I am administrator off the blog. Other admins have the same problem. It doesn't seem code related; I've checked out ...
Jasper Kennis's user avatar
0 votes
1 answer
158 views

Echo Text If User Is Logged in But NOT the Author of post

i am coding a plugin, where user can subscribe to a indvidual author of post (like we do on YouTube). I want to display the subscribe link to all logged in users, but not the author of post. my ...
user avatar
1 vote
0 answers
24 views

Show posts by a custom post author

I have a listing site and various authors create custom posts (job_listing) On the listing post itself, I would like to show the links to the last 5 NORMAL blog posts by that author Is this anywhere ...
Mark Pratt's user avatar
0 votes
1 answer
74 views

Need to display author's email id in the "Edit post" field in wp dashboard. How do I do this?

I have created a custom post type & have enabled frontend posting for the same. I need the Edit post page to display the original author's email id. I already have "post author" displayed, but ...
Sumit Shetty's user avatar
0 votes
1 answer
520 views

On Wordpress Search, how to search post from Author meta also

With below code working for searching with post title and post content. And also after installing plugin 'ACF: Better Search', the post is also searching from the ACF fields and give search result on ...
Rajan Shrestha's user avatar
0 votes
1 answer
52 views

Only allow posts with a specific term to only be viewed by other authors with the same term in their post

I have lots of authors each with a post each. I only want posts that have a specific term (from a custom taxonomy) to be visible by other authors with the same term in their post. In other words, if ...
Pete's user avatar
  • 1,048
0 votes
1 answer
25 views

Change all author links in Blog roll

I want all the author links on my blog page to go to a specific url ("/about") instead of the individual author pages. I know this can be done easily with JavaScript, but is there way to do it in ...
AJT's user avatar
  • 187
1 vote
1 answer
54 views

Auto "expire" all of an authors posts on spcific date

Ok, so here is a slightly weird one that I could not find an answer to... yet. I've built a classifieds site using WP-Types, but ignore that fact for now. Is there any way to auto-expire all of an ...
labworxsa's user avatar
0 votes
0 answers
533 views

Delete Post by User

Been trying to come up with a way to remove posts by a user when their role is changed. I am using woo subscriptions which gives a user the role subscribed when they join. However when they cancel it ...
Chazlie's user avatar
  • 35
0 votes
2 answers
374 views

How to hide meta from search result only on pages?

I have different content on static pages and post in my WP site. On pages is not desirable to view meta in search result, but in my post is important. Meta, I mean information about author, and date ...
streng's user avatar
  • 1
0 votes
2 answers
715 views

Custom Post Type & Author not associating, user post count is 0, api doesn't return author in post objects

When Users create custom post types, the author field does not seem to be passed back to WP posts functions. As the title says, I'm creating a user account programatically, and having that user log-...
lakewood's user avatar
  • 141
1 vote
1 answer
2k views

How to get the user meta data for a post?

Im trying to get the user meta data from a post but only getting the one user: $args = array( 'numberposts' => 10, 'offset' => 0, 'category' => 0, 'orderby' => 'post_date',...
Sylar's user avatar
  • 125
0 votes
2 answers
51 views

Numbering author posts in posts query

What i want to get and have no clue how start is: Query posts (for example from specific category, ordered by date) but to have the posts from same author numbered by there count in that posts list. ...
Nori's user avatar
  • 15
0 votes
1 answer
613 views

Restrict category access to specific users/groups. Author always has access

I'm running a Wordpress website. I want to make some of the content on it - posts and custom post types, who belong to a specific category - accessible only to the users, who have been granted access ...
Nikolay M.'s user avatar
0 votes
1 answer
59 views

How to prevent authors from editing their post count?

The number of views is something I am very concerned about as it helps me understand how many people actually read the posts. I have bloggers working with me who may fake their article's popularity ...
Mana's user avatar
  • 113
0 votes
2 answers
58 views

How to limit author related post listing ?

The solution <?php query_posts('posts_per_page=9'); ?> to limit author related posts show the entire website post :( <?php $curauth = (isset($_GET['author_name'])) ? get_user_by('slug'...
Muhammed's user avatar
  • 147
0 votes
1 answer
63 views

Custom author search

I would like to do custom search pages that allow users to see posts written by one and only one specific author. For example, let Bob and Bill be the authors on a blog. One page would allow me to ...
user105460's user avatar
0 votes
1 answer
24 views

Restrict displaying posts to the poster itself (in Back-end)

How can I filter posts in the Back-end so that logged in user sees only her/his own postings and not from others on the listings. My CPT declaration: $args = array( 'labels' => $labels, '...
user3779045's user avatar
0 votes
2 answers
854 views

Changing the Category for all posts of an Author

I'm trying to change the category for all posts of an author. I've been looking on here for about an hour and haven't found a solution.. Any help would be greatly appreciated :) Thanks, j03
j03's user avatar
  • 187
0 votes
1 answer
62 views

How do I retrieve a users' last 5 posts?

How do I retrieve a particular users last 5 blog posts? Currently, I am trying the following approach, but it seems that it is retrieving the actual post titles and permalinks: <?php $...
Moose's user avatar
  • 292
2 votes
2 answers
9k views

Filter posts by author and category simultaneously

I'd like to include in my website a feature for users to only see posts from a certain author and a certain category. I'm able to do it separately but I can't seem to understand how to do it ...
ricardocouto's user avatar
1 vote
1 answer
398 views

Getting the current author (it has changed) of a post, not the original author

I'm trying to get the author's avatar, first name and last name and their bio(description). Luckily I found out how to do do just that, using several functions from the WordPress codex. What I'm ...
BitRyder824's user avatar
0 votes
3 answers
1k views

Get total post from an author

I want to display some data from an author on my loop with this code: Avatar <?php echo get_avatar( $q->ID, 255 ); ?> Name. <?php echo get_the_author_meta('display_name', $q->ID);?&...
Mailmulah's user avatar
1 vote
1 answer
486 views

Limit posts per author role (excluding admin) in home page

I have multiple authors in my site and want to show just one, the latest post from each one, excluding the administrators. So, if for example: admin1 has posted 4 posts admin2 posted 3 posts author1 ...
maus's user avatar
  • 11
0 votes
1 answer
51 views

List of authors posts minus very latest

I'm creating an authors.php page to display all the posts for the author clicked. But the list(s) needs to show the very first / latest post so I can style it diferently than the rest of the posts? ...
DJP2019's user avatar
0 votes
1 answer
186 views

Displaying friend's posts only

So I am using the WPMU Dev friends plugin which adds functionality for WP members to search for friends and to add new friends etc. There is a specific function defined in the PHP file which says it ...
dwinnbrown's user avatar
0 votes
3 answers
5k views

Display author's name and avatar in post's sidebar

I'd like to display the post author's name and avatar on posts sidebar but I can't find any info on it. Is there a shortcode or piece of code to do this ? Thanks for your help
Graham Slick's user avatar
0 votes
2 answers
1k views

Send email to author of post on post submission

I am using WordPress directory theme. I want to send an email to the author of the post whenever he publishes a new post. Currently, email is just sent to the administrator only. I didn't find any ...
Asif Ali's user avatar
7 votes
1 answer
686 views

Hook that get's triggered when the author of a post is changed

Is there any hook that gets trigged when the author of a post is modified from the edit post screen? I can list to the update post hook, but then I will not know whether the author of the post was ...
Sudar's user avatar
  • 809
0 votes
1 answer
86 views

show latest authors blog post

how do you display the latest authors blog post? I have the below code: <?php $author = get_the_author(); $args = array( 'numberposts' => '1', 'author'=>$author ); $recent_posts = ...
user3615681's user avatar
3 votes
3 answers
3k views

Query posts distinct authors

I am trying to get post from a category ordered random, but making sure that the author does not repeat itself. So I have this query which works as intended, but there is the chance that the author ...
CiprianD's user avatar
  • 264