Questions tagged [author-template]

The tag has no usage guidance.

0
votes
1answer
32 views

Return author name as a tag using get_author

I'm trying to display the author name as a tag. I looked at many forums and it's referring to the get_author methods and the PHP files from the template PHP. However, I do not know what changes to ...
0
votes
1answer
23 views

Change author base and slug in author link

Hello im trying to change the author link from mysite/author/username to mysite/companies/dataFromUserMetabox i tried the approach from this answer chage author url its working the url changed but ...
0
votes
1answer
24 views

Buddypress profile link on author blogroll page

I'm looking to add a link to buddypress profiles on author pages - the page that displays all posts by an individual author. The link would need to direct to the individuals buddypress profile, so ...
1
vote
1answer
78 views

Hide Author.php template from specific user role

I have a author.php template that styles a user profile (custom role: agents,etc) I have a blog and Editors & Contributors can post articles. Problem When a viewer on the blog clicks an ...
0
votes
1answer
66 views

Adding Author Box Meta Links with Co-Authors

I have a site that has multiple authors for a single post, requiring multiple author box bios after the article. I previously used get_the_author_meta() to pull the user's social media hyperlinks ...
1
vote
0answers
21 views

create a new page from a custom post type similar to an authors page

I am looking for some direction here as I am unsure where to start. I have a CPT called 'videos' and one of my inputs is a 'artist_bio' text box that creates a box with a biography in it on my page. ...
0
votes
1answer
315 views

Right way to display the_author_meta fields?

Is the following code an accepted method—-or is there a better one—-to display a list of author contact links? (Extra ones have been added to my user profile page). <ul class="author-contact"> ...
0
votes
1answer
219 views

Get 404 when try open author page

I am having a problem when I try open url /author I always get 404. For example if I open url http://example.com/author/author-1 - OK http://example.com/author/ - 404 why? I try to create page-...
0
votes
1answer
4k views

How to customize the author page in wordpress?

Actually am getting the author URL by get_author_posts_url($authorID) It is redirecting to some page like http://example.com/members/authorName/ So on this page, I need to do some extra ...
0
votes
1answer
583 views

Author posts not appearing for custom post type

I have a custom post type setup called 'Blog' and I have added the ability to assign authors to posts. I want to be able to display a list of posts made by an author, however the posts never appear ...
0
votes
1answer
389 views

WooCommerce get_author_posts_url() - Author URL redirecting to shop base

I've noticed that when I have WooCommerce enabled and use get_author_posts_url() it automatically redirects to the 'shop base' when the user's role is Customer. When I change the user to Subscriber ...
0
votes
1answer
198 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
0answers
122 views

Cant get unique_array() work on get_the_category() foreach loop

i'm trying to list user's posted categories (main ones only) on the author.php I have prepared this loop but it has duplicated content <?php if ( have_posts() ) : while ( have_posts() ) : ...
1
vote
0answers
37 views

Create Next and Previous Link to User orderby Last Name

Within author.php, I have a left and right arrow that is supposed to move to the NEXT or PREVIOUS user orderby based on last_name. So if I had users with these names: Julie Brown Jane Cook John Doe ...
0
votes
1answer
74 views

wp_list_authors() returning the wrong member url

I've recently started work on a site which includes both BuddyPress and bbPress. When I use the wp_list_authors() function the list returned to me links to each author's BuddyPress profile. ...
-3
votes
1answer
237 views

author.php get current id of author for advance custom field

I'm not sure why there is no result with advance custom fields. i use get_the_author_meta('ID') for other information since it's work with single.php but i want also to display the information of ...
1
vote
1answer
85 views

Display Authors in a grid loop

I currently have the following php code which gives me a list of all the current WordPress authors, including their name and avatar. <?php printf('<h1>%s</h1>', the_title()); ...
0
votes
1answer
86 views

Author Page Create Link to Page That Lists All Author's Posts?

In my author.php page, I'm wanting to create a link that sends the user to a list of all posts by that author. I thought this was a built in function of WordPress, but having trouble finding the ...
1
vote
1answer
511 views

pass query string on url to filter media

I have an author page which shows all uploaded media by that author. Each media can have tag1, tag2 or tag3. I would like to add an option where I can show on that same page only tag1 media without ...
1
vote
1answer
901 views

Author archive only for custom post type

I want to create an author archive for only custom post type. This page will includes only custom posts by the author. And url structure should be example.com/portfolio/author/author-name/ I don't ...
0
votes
1answer
64 views

Return subpages of an author if the parent page was published by an other author

I just stumbled over an issue while programming my own WordPress theme and I need your help. I defined an author.php file which should display the static pages and the blog pages of a given author. ...
0
votes
1answer
33 views

Unpublish Authors With not Fulfilled Fields

I want to unpublish profiles of users that doesn't have all extra fields that I've created filled. I use a custom meta_query in a user taxonomy in order to filter those authors, and that work, but it ...
0
votes
1answer
618 views

Save buddypress xprofile data to author meta

I have created a buddypress extended profile field "description" and would like to save the data entered to the "descripion" profile field of the user (DEfault wordpress Biography description field) ...
1
vote
1answer
555 views

List user comments in author page

I'm trying to display a list of the author comments in the authors page but it only shows No comments made. How can I list user comments in the authors page? <?php $args = array( 'user_id' =&...
0
votes
1answer
86 views

Allowing comments on author pages

I need to be able to allow users to leave comments on author profile pages. I came across another answer here that has given me a basic outline of what needs to be done to allow it: Author page: ...
0
votes
1answer
58 views

The best way to create pages like an 'about', 'contact' and etc [closed]

I develop my own theme and I need to create nice looking sites like a contact page or about me page. But I don't have any idea what wordpress template file I can use. Will I have to use page-template ...
1
vote
0answers
39 views

Proper way to set author pages at root?

I want to create landing pages for each user on my site in the same URL structure as most popular social networks: sitename.com/username But of course, I don't want to create pages for each user. ...
0
votes
1answer
376 views

Hide Author page from others

I am using author.php as an author page. I have changed the author base slug to profile so a post author can view their author page at website.com/profile/name As these are basically personal profile ...
0
votes
1answer
335 views

Display content based on Author Custom Post type

I have 2 forms. Form A creates a new user with the role of Author and also creates an entry in a CPT called Judges. Form B creates a new user also with the role of Author and creates an entry in a ...
0
votes
1answer
604 views

Current author archive in navigation menu

I want logged-in user see her/his own author archive page link in top navigation menu,say (a link to a list of all her/his posts). What I achieved so far is this: function my_nav_menu_author_link( $...
-1
votes
1answer
516 views

Display custom post type posts first, then default posts

A normal author.php template has a single loop that displays a list of all the author's posts. I'd like another loop place just above this normal post loop that lists all author's (defined) CPT posts....
1
vote
1answer
1k 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). ...
5
votes
3answers
836 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 ...
0
votes
1answer
111 views

Missing content on author archive page

I got problem when I deal with the 'author archives' pages. Initially I used default 'archives.php' from my theme. Then I add a 'author.php' page, tested on my local machine, it was ok to show the ...
0
votes
1answer
768 views

Show woocommerce products in author archive

I've added permissions to authors to add products in woocommerce. I would like to know if there is a way to display products by current user in archives. Is this possible?
2
votes
1answer
597 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 ...
0
votes
1answer
30 views

Author page from blog post

I am looking to build a custom WordPress blog which is simple enough but I have a requirement I need to meet. On each blog post on the index.php page I want to display the authors name and image. ...
0
votes
1answer
1k views

Pagination for custom query throws 404 errors on last pages [duplicate]

I'm using a custom query to get all CPT posts for the author in author.php. I have a lot of authors and a lot of content so I'm using the wp pagenavi plugin to paginate between these posts. For some ...
3
votes
2answers
339 views

Add admin bar link to edit author

I am trying to allow my editors and admins to click to "Edit Author" as they would "Edit Post" or "Edit [Custom Post Type]" from the admin bar when they are on a page like /authors/jdoe (Note: I do $...
1
vote
2answers
2k views

How can I show a custom post type for users in the authors.php file?

Here is the code I have. It is showing 100 custom post known as campaigns. I need it to only show the current users. So author/joe should only show joe's campaigns. <?php if(isset($_GET[...
0
votes
1answer
239 views

Displaying Total Author View

I'm looking to display the total views generated by each author on their author page. I can't find any php code that works. Can anyone help? I've tried using this code: <?php $author_posts = ...
0
votes
1answer
172 views

Exclude specific user_id from args in get_comments

I'm basically using a 'latest comments' system on multiple pages where one specific user is listed as the first reply for a comment - highlighted with special CSS - and then 2-3 normal users below ...
1
vote
2answers
717 views

Conditional tag based on the role of author in author.php

Is there any way to display different data in an author.php profile template depending on the role of the profile displayed? (NOT of the person viewing it, but the author that particular profile ...
-1
votes
1answer
119 views

Customise Author Page?

On my website I would enjoy to make it so that if a reader clicks an author or user's name it takes them to a page displaying their profile picture and bio. All users on my blog have the option to add ...
1
vote
1answer
597 views

Create template “author” with a plugin

I'm creating a plugin to modify the user profile into wp panel. I'd like to add an author template with the same plugin. I don't know if there is the file author.php into directory of theme. So I'd ...
0
votes
1answer
127 views

How to Modify Author Page for all Users?

I am going to create a user profile page for all users in my blog. I thought, it is better to modify the author page for all users. <?php if(is_author()) { echo get_avatar( get_the_author_meta( '...
1
vote
1answer
1k views

Loop starts from the beginning with second while loop on author.php

I am using the same template for author.php and home/blog.php. I have a loop split into 3 parts. <?php if(have_posts()): the_post; //do a thing endif: $i = 0; while(have_posts()): the_post(); ...
1
vote
1answer
2k views

How to set back query var author_name after unset it?

I am unsetting the query var author_name for querying posts in the author template page. I am using pre_get_posts to filter the main query. After the query is run, I need to set back the author_name ...
1
vote
1answer
946 views

pre_get_posts Tax Query not working for custom author page

I am using the theme TwentyTwelve and modified the standard post query in the file author.php with the following code: function wpd_author_query( $query ) { //CODE to set $current_user_name here //...
1
vote
0answers
327 views

Comments on Author page

Update: Ok,the DEBUG log says: PHP Notice: Undefined offset: 0 in /home/content/00/8437600/html/test/wp-includes/query.php on line 3105 PHP Notice: Trying to get property of non-object in /home/...