Skip to main content

Questions tagged [author]

'Author' in the WP context can refer to two different things: the person who has written a certain post/page or the role a user has.

Filter by
Sorted by
Tagged with
0 votes
1 answer
700 views

Showing the authors username and bio on custom author.php

I have this code I'm using to create a custom author.php, which is working great to show that users posts and it's children etc: <?php get_header(); ?> <?php $curauth = (isset($_GET['...
0 votes
2 answers
811 views

Show Custom Post Type by Author

I would like to set up a function in my functions.php file in a theme so that when a custom-post-type is being viewed, if the user clicks the author name in the post, it only shows CPTs by that author,...
1 vote
0 answers
10 views

How to Dynamically Change the author_base URL Slug by Language in WordPress?

I am working on a multilingual WordPress site using WPML and I am trying to adjust the author_base URL slug based on the user's language. My goal is to have different slugs for each supported language ...
0 votes
1 answer
776 views

When clicking on author, it shows my email address in url

When clicking on the author in the post, it shows my email address in the URL on the new page. How can it be changed? I'm using wordpress.
6 votes
5 answers
7k views

Prevent Authors from viewing each others Posts

I am setting up a site where there will be multiple users as Author, the owner doesn't want the authors to be able to view each others posts, since there are some meta fields with information he'd ...
1 vote
1 answer
940 views

Can multiple authors be assigned on a single custom post?

I have custom post types that I would like to make editable by several users. I created one custom post type using the Toolset plugin. wp_update_post only allows us to set single author: $user_id = ...
0 votes
2 answers
887 views

Get author image from corresponding article in thumbnail

I want to add an author image for each thumbnail-preview on my homepage. I tried <?php echo get_avatar( get_the_author_meta( 'ID' ), 32 ); ?> but it gives me the same image in every thumbnail. ...
2 votes
2 answers
750 views

How to fetch custom post by Author?

Here is code , basically I want to fetch by Post author but not able to solve this any help regards this . <?php global $post; $author = get_the_author(); $...
0 votes
1 answer
794 views

Query filter on custom post by current author in post widget for elementor query id

I am using post widget in elementor pro. Idea is to show all posts by a specific custom post type. Now, I want to apply also some filters in particular I want to show only posts in a particular status ...
0 votes
2 answers
2k views

Changing Wordpress author name in database

I originally begun my wordpress site using a psudonym. Over the past few years I have been attributing my own name to all articles and have had the author name options switched off. Now I'm changing ...
0 votes
1 answer
3k views

Display only author posts in dashboard all posts panel

I would like to display only authors own posts in dashboard all posts section. As of now it displays everything. I found some code here which is written by @t31os Its working correctly. function ...
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 ...
2 votes
1 answer
1k views

How to make an author archive only for certain user role and show related CPT

Scenario I made a CPT where I'm taking the stakeholder's ID as a custom field. All the stakeholders are actually a WordPress' Registered User with a different role stakeholders - because at some point ...
0 votes
0 answers
11 views

Link Wordpress Comment Admin Author name with About page

I am looking for a functions.php code which will link my admin author name in WordPress Comments to the About page of the admin. Currently the code I am using links my post admin author name with the ...
6 votes
2 answers
657 views

Link to Author archive from Navigation Menus in dashboard?

I'd like to display a grid of authors on my site showing the name of the author and their avatar. The tricky part is, I'd like to be able to control this from the Menus page in the dashboard so I have ...
0 votes
0 answers
29 views

Include posts under a custom taxonomy in author.php

The author’s archive (author.php) on the website I’m working on displays only the posts by the current author. I have a custom taxonomy called “co_writer” which I use to simply tag a post as having ...
1 vote
0 answers
24 views

Include posts with a specific custom taxonomy term in author page

I created a "co_writer" custom taxonomy with author names as terms. I only use this taxonomy to output their names as co-authors on multi-author posts. As such, posts in which an author's ...
0 votes
0 answers
15 views

How do you create a query to hide all posts with a certain meta key, unless current user is the author of that post, without custom SQL?

The scenario, which I would have thought is quite common, could be where a blog post has been assigned a particular meta, and should be removed from public display, apart from the original author who ...
2 votes
2 answers
12k views

How to link to the current User/Author Profile page?

Is there a way to link to the authors profile page? At the moment i can access the authors profile by visiting the url like this: http://mysite.com/?author=1 Is there a function that i could use to ...
1 vote
1 answer
2k views

Showing author's page with no posts

I'm building a meet the team page, which will be included all team members. I'm using the author.php file template. I have a page that shows all authors (it works with authors who have no posts). ...
6 votes
2 answers
8k views

Publish author posts only with editor approval?

I run a multi author blog and i am looking for a non plugin solution. The default author user role in Wordpress can publish posts without any approvel - look at Role Capabilities Wordpress Codex. ...
16 votes
8 answers
17k views

Select subscriber as author of post in admin panel?

I want to be able to select a subscriber an author of a post in the admin so it displays their name as having written the post, but I do not want to give them any additional privileges (if they login ...
0 votes
0 answers
20 views

WP_QUERY with both author and post_type set (makes me crazy)

If I do this $args2 = array( 'post_type' => 'post', ); $query2 = new WP_Query($args2); error_log($query2->request); Then I see this result SELECT ...
0 votes
0 answers
11 views

How to change the url of the author to a specific page?

I want to change the url of the author to a specific page. from http://xuzhousoft.com/blog/author/zhuliang/ to http://xuzhousoft.com/zhuliang/ how to do this?
1 vote
0 answers
51 views

Problem with "is_user_logged_in()" and woocommerce (Code for custom media upload for each author.)

I'm sorry for my english... I am using the following code to create separate media directories for each author.. ( Thanks to https://wordpress.stackexchange.com/a/400352/220907 ) function ...
0 votes
3 answers
622 views

Only Allow post author and "Premium" Role user to comment

Is there a way to make it so Everyone can see comments, But only the post author or those belonging to the Premium role can post a comment? Could I do something like global $current_user; ...
0 votes
3 answers
498 views

How do I change the user via SQL?

I change a user via SQL in wordpress: SET @old_user='old_user'; SET @new_user='new_user'; UPDATE wp_users SET user_login = replace(user_login, @old_user, @new_user); UPDATE wp_users SET ...
1 vote
1 answer
4k views

How to change the post author when the post is published?

I wanted to change the author when a post change from draft to publish. I have $_GET['auth_id'] variable in post edit screen like this ...wp-admin/post.php?post=53&action=edit&auth_id=5. I ...
2 votes
0 answers
27 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 $...
-1 votes
3 answers
1k views

Display Authors avatars when more than one author

On a blog, i'm using the following to display the post authors avatars: <a href="<?php echo get_author_posts_url(get_the_author_meta( 'ID' )); ?>" style="color:#ffffff;"><?php echo ...
1 vote
1 answer
905 views

How to restrict author to only access one custom post type ?

My installed Wordpress have 4 custom post type and 1 default post type. Basically what i want is that the author can also access particular one custom post type. Author must not see other post types.
0 votes
1 answer
1k views

author.php not showing content if Author has no Posts

I am making a custom Genesis theme, and have a custom author.php file that pulls in various custom fields (Using Advanced Custom Fields), and author meta information to the page from the author ...
-1 votes
1 answer
987 views

How to remove author from Social sharing links?

You see how it says By Terrance, I've tried everything to take it out. Nothing will do it. Any help would be appreciated. www.doseoftechnology.com
0 votes
0 answers
19 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?
1 vote
0 answers
33 views

Assign new post author IF another user in custom field on post transition

I have a post that is being made on behalf of someone else - so a team member adds the post for the author using a frontend form, but when the post status changes to publish, I want the selected user ...
0 votes
1 answer
199 views

Create guest author page via php

I am building a website that has many guest authors, but there is only one admin account that publishes it all. Instead of creating multiple accounts, which would be impractical due to the high number ...
0 votes
0 answers
165 views

Change get_author_posts_url / Author URL via filter

I have a follow-up question to this answer here: Create guest author page via php I would like to modify the get_author_posts_url function to get a custom taxonomy guest author slug. I need this ...
1 vote
1 answer
25 views

How to load locally saved author photos based on author ID

I'm looking for a way to allow the author photo to be shown without the author having a gravatar account. It seems this should be based on author id rather than email. Basically I just want to be able ...
-1 votes
1 answer
57 views

How to display Author Profile based on Custom field value

I need to display additional author profile based on Custom Field Value. I am using native wordpress custom filed declaration. so for my custom field name is $coauthor = get_post_meta( get_the_ID(), '...
0 votes
0 answers
136 views

How to add avatar to authors list?

I have code that shows authors list: <?php wp_list_authors( 'exclude_admin=0&optioncount=1' ); ?> It works fine, with number of posts per author and author page link https://images2.imgbox....
0 votes
1 answer
195 views

how to make author to write comment on only his own posts?

i want restrict my registered authors to write comment to other posts except his own posts. Is it possible? I have no idea how to do it. May be need conditional logic but how?
0 votes
1 answer
124 views

the_author function is displaying wrong name and url

There is a problem by using the_author(); in file author.php I use this code to display author name heading <h1 class="page-title"><a>آخرین اخبار</a> <a href="<?...
6 votes
3 answers
11k views

Change Comment Author Display Name

I am trying to change the comment author name (or more specifically, the review author in WooCommerce) to be First name Last Initial (e.g., "John D." for "John Doe"). I got most of the way there with ...
1 vote
1 answer
487 views

How to force the Author Dropdown to display in Quick/Bulk edit?

I believe this issue is a bug with the latest version of WP on multisite (I've reported it) but until they fix it I really need a simple solution. I have multiple authors (Administrator and Editor ...
0 votes
1 answer
12 views

How to have certain WordPress settings set by default on a per author basis

I have a WP author who always needs to change various settings when creating a new post: Display author box (post format) Display last updated (post format) Select 'News' category (categories) Select ...
1 vote
3 answers
4k views

Author bio Social Links

I'm using simple code to show user social link in author bio. in functions.php <?php function add_remove_contactmethods( $contactmethods ) { // Add Twitter $contactmethods['twitter'] = '...
0 votes
0 answers
34 views

Adding plugin editing capability for Author

I am new to php environment. Any idea how we could enable plugin editing roles and capabilities for Author or another scenario could be adding as sub-admin with limited roles. Any help would be ...
0 votes
0 answers
117 views

"Author" custom post type

I have an existing WP site where there is a custom post type called Author with a few hundred entries. I need to create a single entry page from these authors, but single-author.php just returns a 404....
0 votes
1 answer
132 views

Assign author to category and not only posts

Is it possible to assign an author as a writer for a category? I know that authors are mainly for posts/pages, but my client has a site structure where the categories basically act as pages. I could ...
1 vote
1 answer
44 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 ...

1
2 3 4 5
18