Skip Navigation

[Resolved] Author archive page not showing correct content

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to display current Author information on Author archive page

Solution:
You should create a custom shortcode to retrieve the current author ID on archive page and use it with [wpv-user] shortcode to display current author information on author archive page.

You can find proposed solution, in this case, with the following reply:
=> https://toolset.com/forums/topic/author-archive-page-not-showing-correct-content/#post-1077300

Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-user

This support ticket is created 6 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 6 replies, has 2 voices.

Last updated by katrina 6 years, 3 months ago.

Assisted by: Minesh.

Author
Posts
#1075168

I am trying to: Display the author name and biographical information on the author archive page

Link to a page where the issue can be seen: will provide in a private message

I expected to see: author name and biographical information on the author archive page

Instead, I got: wrong name and no biographical data or photo

I just checked one of my author pages, and the biography and headshot and name are not displaying. Instead, there is no bio or photo, and the wrong name. The correct posts, however, are displaying.

I am not sure when this change happened, because I haven't modified the Author Archive template in years I expect—(except for today while trying to troubleshoot)—and all the correct details used to display correctly on this archive page. So an update of some sort must have happened recently that renders the current code incorrect. I can provide site login details and links in a private message. Thank you in advance for your help in resolving this issue.

#1076077

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - could you please share couple of links where I can see the archive displaying wrong information with details what should be the expected one.

I have set the next reply to private which means only you and I have access to it.

#1076309
#1077300

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - there seems to be some issue with Types shortcode when you try to display usermeta.

I've added following shortcode to your current theme's functions.php file:

function func_get_id_in_author_archive($atts) {
  $author_id = 0;
  if (is_author()){
	  $author_id = get_query_var('author');
   
  }
  return $author_id;
}
add_shortcode("get_id_on_author_archive", "func_get_id_in_author_archive");

- I've Register the above shortcode at:
=> Toolset => Settings => Frontend content => Third-party shortcode arguments

For now, the workaround is the following:
To display the description:

[wpv-user field="description" id="[get_id_on_author_archive]"]

As you can see its started to display the description:
=> hidden link

For image, I've reported the issue and I will get back to you as soon as I know more.

#1077315

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

The image also can be printed using the following code where we passed the attribute user_id="[get_id_on_author_archive]" .

<div class="authorPic" style="background-image:url([types usermeta="author-image" url="true" user_id="[get_id_on_author_archive]"  size="profile-pic"][/types]);"></div>

Now both - profile picture and description is displaying:
=> hidden link

#1078669

Hi Minesh,

Thanks so much for looking into this for me. I am not really very proficient at navigation the functions.php file, and I am fairly certain that I had some help in the first place setting up the authors.

Presumeably something changed in Toolset, because i have never been to or seen the section where we need to register the shortcode.

I can see you resolved the issue (thank you) and I'll take a look this weekend to see if it makes sense to me. I'll come back and mark this topic as closed if i have no further questions.

Thanks again!

#1078685

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Presumeably something changed in Toolset, because i have never been to or seen the section where we need to register the shortcode.
==> No, its available since long time but maybe you were not aware of it as there were no need to use it until now.

I can see you resolved the issue (thank you) and I'll take a look this weekend to see if it makes sense to me. I'll come back and mark this topic as closed if i have no further questions.
=> Please, if you have further questions, please feel free to open a new ticket as this will help other users searching on the forum as well as it will help us to write correct ticket resolution summary.

Thank you for understanding. Please feel free to close this for now 🙂

#1078692

Ok thank you Minesh!