Questions tagged [author-template]

The tag has no usage guidance.

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

Can I Include author login in post class?

How can I include author nicename in post class by using post_class filter? I want to add author-AuthorLogin class in post class so that I can apply styles based on author name. Is there any way to ...
2
votes
1answer
623 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 ...
1
vote
1answer
996 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
35 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 ...
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
26 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
81 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
79 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 ...
0
votes
1answer
624 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( $...
-3
votes
1answer
249 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
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
350 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
4answers
2k views

Getting author URL outside the loop

I am trying to get author information in my header.php. This is what I use to display the name and it works like a charm: <?php $author_id=$post->post_author; ?><?php echo ...
0
votes
1answer
250 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-...
3
votes
1answer
1k views

Limit the length of the Author Profile Biographical Text

What it says on the tin: how can I limit the amount of text a user enters in the Biographical Info area of the User Profile? With a function? Or, jQuery if there is no way with a function? If it ...
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 ...
-1
votes
1answer
550 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....
0
votes
1answer
638 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 ...
2
votes
2answers
5k views

Display all comments or recent comments per user on author page

I have author pages for each author and I want to see all of their comments (or all of their recent comments) if I click on their nickname. How can I do this? I tried the beneath code, but that does ...
0
votes
1answer
408 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 ...
1
vote
1answer
609 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 ...
4
votes
3answers
447 views

5 blogs on one WordPress site

What is the best way to have multiple blogs on one site? I am not talking about Multisite. What I want is one website with 5 blogs. All accessible from one menu and editable from one backend, I could ...
0
votes
1answer
220 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
138 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() ) : ...
0
votes
1answer
76 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. ...
0
votes
1answer
383 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 ...
1
vote
1answer
87 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
97 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
560 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 ...
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 ...
1
vote
2answers
741 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 ...
0
votes
1answer
654 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) ...
0
votes
2answers
53 views

Which page is referring to *all posts by author*?

I am developing a blog and whenever I press on an author name I get the page with all pages by this author, but this page looks really bad. Any ideas of where I should inspect for problem?
1
vote
1answer
594 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
92 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
337 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 ...
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
868 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
115 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
789 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?
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 ...
2
votes
4answers
4k views

Show author archive pages for authors with no posts

I have one page for each author, but if the author doesn't have any posts I can't get its variables, because the loop is empty. The page returns empty, no avatar, no info and stuff, the whole site is ...
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 ...
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[...
3
votes
2answers
347 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 $...