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
26 votes
4 answers
44k views

How to remove the author pages?

I submitted my site to Google and now the author page is showing up in the search results. http://www.domain.com/author/myusername How do I prevent my and others author names from showing up in ...
1.21 gigawatts's user avatar
24 votes
3 answers
19k views

How to check if a user (not current user) is logged in?

I need to display the online status (online/offline) for each author page (custom author page template). is_user_logged_in() only applies to the current user and I can't find a relevant approach ...
Dominor Novus's user avatar
21 votes
3 answers
66k views

get post author id outside loop

I need to place in post edit dashboard metabox with post author e-mail (or other user meta fields). So it can be edited when admin reviews this post. $meta_id = get_the_author_meta( 'user_email', $...
th3rion's user avatar
  • 479
19 votes
8 answers
66k views

How to get Author ID outside the loop

I can't get the post author ID outside the loop to make the get_the_author_meta work. So far I've tried different approaches: 1. $author_id=$post->post_author; 2. global $post; $author_id=$post-...
Marce Castro's user avatar
19 votes
3 answers
36k views

How to get a buddypress user profile link and a certain user profile field for the current post author?

I want to replace get_author_link() and get_the_author_meta($feld) with something equivalent to point to the author of the current post Buddypress user profile page and retrieve a specific profile ...
unfulvio's user avatar
  • 1,814
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 ...
fxfuture's user avatar
  • 1,337
16 votes
3 answers
27k views

Change the Author Slug from Username to Nickname

Hi to the community, is it possible to change the default username slug to nickname if is available? By default the url is something like: http://domain.tld/author/(admin) , is it possible to ...
Philip's user avatar
  • 2,019
14 votes
3 answers
23k views

Echo author ID in author.php

This is probably a super simple question. But how do I echo the ID of a user on author.php? I've tried the_author_meta('ID') But it didn't seem to want to work. I want to echo it at the end of a ...
Dean Elliott's user avatar
14 votes
4 answers
6k views

Override default url for author pages?

So the default url to display a list of posts by a particular author looks like this: http://domain.com/author/{username} I am wondering how to change the 'author' in that url to something else? I ...
jessegavin's user avatar
  • 3,456
11 votes
1 answer
18k views

Woocommerce: assign an "author" to a product

I'm developing my first theme for woocommerce. I need to be able to have "authors" (really "designers") assigned to woocommerce products. Is that feasible? I was thinking of using the wordpress ...
pixeline's user avatar
  • 2,857
11 votes
1 answer
10k views

How can HTML be allowed in Author Bio?

Is there a way to prevent WP from stripping the HTML from the author bio? I need it to keep my paragraphs. Thanks in advance! :) Edit - Although this question has been answered, I will clarify that ...
5t3ph's user avatar
  • 900
10 votes
2 answers
21k views

Programatically change post author

Given a user id, $user_id, and post id, $post_id, how can I programatically update a wordpress post author? Note: these posts are already created and the author cannot be set upon creation. Another ...
italiansoda's user avatar
9 votes
3 answers
9k views

Change author permalink

The original urls for users look like /author/login/ Is it possible to replace login by user's id? In my dream urls should become to /users/34/ (34 is user id). Thanks.
ilovewordpress's user avatar
9 votes
2 answers
8k views

Extend WordPress search to include user search

There is many a WordPress plugin out there that enhances WordPress search but I have yet to find a plugin that will add user search. Search Everything used to have the functionality but was removed ...
Scott's user avatar
  • 12.3k
8 votes
2 answers
469 views

WordPress Internal @ Mentions

I'm looking for a way to link to author pages within one WordPress install simply by putting the @ symbol in front of a person's username in a post.... just like on twitter. Example: If the username ...
AndrettiMilas's user avatar
8 votes
1 answer
4k views

the_author() returns empty string

I have created a page template for the front page of a site I am building using WordPress. I am displaying the 3 latest posts on this page and all works fine except for the display of the author of ...
Simon Fox's user avatar
  • 183
8 votes
2 answers
1k views

Use author author display name in permalink structure for pages and posts

I need to add the author name as a subdirectory prefix for all user's posts and pages. For example: example.com/johndoe/ //The author page for John Doe example.com/johndoe/category/test-post/ //Test ...
bigmike7801's user avatar
7 votes
1 answer
7k views

How to display a public profile page for registered users with custom slug?

I have a website where users can register, login and their edit profile, they can comment but not post. What I am looking for is a way to display a user profile page (where I display the gravatar and ...
Andycap's user avatar
  • 585
7 votes
1 answer
674 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
7 votes
3 answers
11k views

Possible to search by author name with default WordPress search function?

I realize improving WordPress's search function is a huge can of worms, but the ONLY additional thing I need it to do is to show results when I search for an author's name. For example, if we have an ...
zack's user avatar
  • 211
7 votes
1 answer
15k views

How to add the author search in the default wordpress search?

I would like to include the author search in the default WordPress search. Is there any way of doing this? right know it retrieves all the posts with the permalinks and author names. same way i need ...
Naveen's user avatar
  • 199
7 votes
2 answers
2k views

Change the author slug from nickname to ID

I've changed the default registering option by allowing people to sign up with their e-mail addresses. They also have an option to add their firstname, lastname but it's not required. // Allow email ...
Laniakea's user avatar
  • 503
6 votes
4 answers
29k views

How to get author's name by author's id

I want to show recent posts like this. <ul id="recent-posts"> <?php foreach( wp_get_recent_posts() as $recent ){ ?> <li> <a href="<?php echo get_permalink($recent['...
ironsand's user avatar
  • 559
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 ...
Chuck's user avatar
  • 523
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. ...
NewUser's user avatar
  • 557
6 votes
3 answers
5k views

How to let contributors to create a new revision(draft) editing their published posts

I'm using a custom post type to let contributors have a personal page on the site. Any time a user registers on my site a script creates a custom type post that has the registering user as the author....
bluantinoo's user avatar
6 votes
2 answers
10k views

How can I add an Author filter to the Media Library?

By default the WordPress Media Library allows you to filter results by their type or date. How can I add a third drop down to list and filter by author? Currently we have this: I'd like to have the ...
j08691's user avatar
  • 775
6 votes
1 answer
1k views

Display Random Author with Details in Sidebar

PHP newbie here, recently decided to have a stab at cobbling together a kooky little 'Random Author Spotlight' feature into my current WordPress theme. I'm almost done, but I've hit something of a ...
Steve's user avatar
  • 61
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 ...
Web Builder's user avatar
6 votes
2 answers
1k views

Having Multiple authors for the same WordPress Plugin

Is it possible to have more than one author for a WordPress plugin using the plugin comment block? I searched for it, but I think it's not possible through the default way. Is there a workaround for ...
Rounds's user avatar
  • 181
6 votes
2 answers
231 views

Restrict one post per author

I'm trying to create an events plugin and so far, I'm through with the following: A short-code that displays a form on the front-end to the user. The event display page that renders the output. '...
TheBigK's user avatar
  • 549
6 votes
2 answers
658 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 ...
javy's user avatar
  • 456
5 votes
4 answers
5k views

Author page: Comments and Ratings?

I have a mult-author site where the author page gets high traffic. People want to know more about them. I have modified the author page to show more info, some custom fields, etc. but what I'd ...
RodeoRamsey's user avatar
  • 1,707
5 votes
2 answers
21k views

Getting a list of custom posts by author

I'm trying to have a page where a user can view all of the custom post types after they click on an author from a previous page, but I'm having no luck with anything I can find in the built-in PHP ...
m0ngr31's user avatar
  • 151
5 votes
1 answer
3k views

Help to condense/optimize some working code

WordPress by default shows ALL posts to users who are Authors. I wanted Authors to only be able to see their own posts so I came up with the following code which works well. Any suggestions to ...
Paul's user avatar
  • 958
5 votes
3 answers
2k views

Display Authors Comments on Profile Page

I am trying to display authors comments on their profile page (author.php), however both codes I tried seem to display everyone's comments. Also the second code is suppose to link to the specific ...
730wavy's user avatar
  • 193
5 votes
5 answers
5k views

the_author_posts_link() for authors of custom post types

I have both regular blog posts and a custom post type in a blog. The page template shows the author posts link. If you click on that link for an author that has authored some posts, that page (blog/...
Tom Auger's user avatar
  • 7,066
5 votes
2 answers
936 views

Check If comment author is registered

It should be simple, but I tried some codes, none does the trick. Searched on Google, nothing there either. Simply check if the comment author is a registered user (so I can add some code for it), ...
vyperlook's user avatar
  • 177
5 votes
1 answer
2k views

Display posts with author in the url with custom post types

I'm having a really difficult time with this. I have a multi-user gallery site. Each author has his own page that lists the author's posts (this is a custom post type). I have made it so that the ...
hlotvonen's user avatar
5 votes
3 answers
6k views

Is it possible to disable certain user roles from creating tags?

As a site admin, I'd like to have control over things. I'd like to prevent my contributors and authors ( who generate content for me ) from creating new tags. I don't want that tag taxonomy to turn ...
Average Joe's user avatar
  • 1,879
5 votes
1 answer
2k views

How to show list of posts by author and category?

Let three categories and their IDs: cat1 = 1 (parent) cat2 = 2 (child of cat1, parent of cat3) cat3 = 3 (child of cat2) Let each category has 3 posts, they are: post1, post2, post3. And each posts ...
Joyanta Bhowmik's user avatar
4 votes
4 answers
22k views

Display edit link if post author is current user

I am creating an author.php page and listing all the posts from an author. Although admins can see the posts' edit links i want to echo the link if logged in user is the current user for example if ...
Emre Caglar's user avatar
4 votes
2 answers
6k views

Wordpress: How to get the current logged in author page URL?

Is there a way to display, via a PHP function, the author posts link (myblog.com/author/jason) of the current logged in user ? In fact, I would like to display, for every logged in user, a "My ...
user avatar
4 votes
4 answers
3k views

Adding %author% in custom post type URL structure?

I'm trying to do some WordPress URL rewriting ... Specifically I have custom post type that currently works like this: http://mydomain.com/videos/post-title/ But I would like to have it located at: ...
Thomas's user avatar
  • 487
4 votes
2 answers
3k views

How to force listing contributors in authors dropdown menu

I am aware that contributors cannot publish posts, and that by design WP will not show contributors in the author dropdown list (this has been discussed here: Contributors missing from author dropdown)...
Riccardo's user avatar
  • 961
4 votes
4 answers
36k views

show author image in posts

I need to display author image along with posts. I used the following code to display posts with author image. $the_query = new WP_Query("post_type=post&paged=".get_query_var('paged')); while ( $...
designersvsoft's user avatar
4 votes
2 answers
9k views

Give Author users the right to embed

I'm trying to allow "author" users to embed in posts. I (the administrator) can iframe, embed, etc...., but authors can not. Can someone show me to give authors 'just' the ability to embed and ...
Mr. B's user avatar
  • 307
4 votes
2 answers
13k views

Force display name as full name

Is there a way I can force all users display names to be Firstname Lastname or alternatively change this to be the default?
Svish's user avatar
  • 229
4 votes
1 answer
11k views

How to get post author name by its ID inside a function?

i'm trying to get the author name using the "the_author_meta" function. After doing that I need to pass the value inside an array and return that with "json_encode". Let me show: $autor_id = $post-&...
Vitor Argos's user avatar
4 votes
3 answers
2k views

How can I publish a post with two or more authors?

A friend and I have a Wordpress blog and we want to be able to publish a post with more than one author. How can I do this?
daviesgeek's user avatar

1
2 3 4 5
18