Skip Navigation

[Resolved] How to Create Profile Pages

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

Problem: I would like to create Author Profile pages where each Author's profile information will be displayed. I do not want to display the Author's post list here. I would like to add links to each Author's profile in a View of posts.

Solution: You can use a WordPress Archive for Authors to accomplish this. Create a new WordPress Archive for the Author archive, and insert your Author's profile information outside the wpv-loop tags. Remove all content between the wpv-loop tags.

[wpv-layout-start]
Post Author: [wpv-post-author format="name"]
-- Add your profile information here --
    [wpv-items-found]   
<!-- wpv-loop-start -->
        <wpv-loop></wpv-loop>
    <!-- wpv-loop-end -->
    [/wpv-items-found]
    [wpv-no-items-found]
        <strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
    [/wpv-no-items-found]
[wpv-layout-end]

Then to place a link to each Author's archive page in a View of posts, use the wpv-post-author shortcode:

[wpv-post-author format="link"]

Relevant Documentation:
https://toolset.com/documentation/user-guides/normal-vs-archive-views/
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-author

This support ticket is created 6 years, 4 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 10 replies, has 2 voices.

Last updated by theW 6 years, 4 months ago.

Assisted by: Christian Cox.

Author
Posts
#599485
l.png

Tell us what you are trying to do?
Hello,
I have successfully created the "Edit My Profile" CRED form for the users of my site, thanks to your tutorials.
What I haven't found is how to make the VIEW to display that users' data.

Furthermore, anytime an Author Name appears in the site, it should link to this Profile Page in View Mode.
For example in my Custom Posts Loop, when the author appears.
(See attached)

Is there any documentation that you are following?
None

Is there a similar example that we can see?
Like facebook has a page to "Edit the Profile" and a page to "VIEW the Profile" which others see.

What is the link to your site?
hidden link

#599620

In WordPress, the "profile" as you know it from Facebook does not exist.

What exists is the author archive. This is the native "Profile" that you can see on the front end. It is an archive, not a Page, hence it needs to be edited with the WordPress Archive Views: https://toolset.com/documentation/user-guides/normal-vs-archive-views/

The links to the archive can be inserted with the ShortCode [wpv-post-author format="link"]. https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-author

This should help you to create the correct links to the respective Archives, which you can style in Toolset > WordPress Archives

#600351
Screen Shot 2017-12-19 at 2.58.49 PM.png

Thank you very much for your response Cox,
I'll take a look!..

Is there a way to remove all Posts created by that author in their archive?

The purposed of this site is to keep things private, so no user should be able to see all the Posts/Custom Posts that one Author has.
I'm only after displaying their basic info which would be the Custom Fields that I set up with WP-Types.
Please see the image attached.

#600357

It sounds like you would like each User to be able to see their own Archive with their own Posts, but you would like to hide the Posts by other authors. Is that correct? If so, you can use a conditional in your WordPress Archive that tests the current User's name against the archive author's name:

[wpv-conditional if="( '[wpv-current-user info='name']' eq '[wpv-post-author format='name']' )"]
	<ul class="wpv-loop js-wpv-loop">
		<wpv-loop>
			<li>
				[wpv-post-link]
				[wpv-post-author]
			</li>
		</wpv-loop>
	</ul>[/wpv-conditional]
#600699
L.png

Thank you so much for your reply and help Cox.

No, that is not what I'm trying to accomplish.
Let me explain the first easy scenario:

I have a page that's called "Shared with me"
This page lists Custom Posts, that have been created and shared by other Authors, NOT the current logged in User.
I think it could be called a Post "Loop"

Inside this loop there is the typical data like:
- Post Title,
- Date created,
- Comment Counter &
- POST AUTHOR.

Please see the screenshot attached.
*ALL OF THE ABOVE IS ALREADY ACCOMPLISHED*

So my goal is:

When the Author Link gets Clicked by the Viewers,
they would VIEW the Author's Profile but NOT any more of his Posts at all.

See what I mean?

#600884

*ALL OF THE ABOVE IS ALREADY ACCOMPLISHED*
Okay great. I assume your "Author link" in each post shown in your screenshot is a link to the Author's archive, like yoursite.com/author/username/. This URL is automatically generated by WordPress, so you do not need to create this as a Page. The content shown at this URL can be designed using a WordPress Archive, where you can add the profile information you showed above.

Then below that profile information, you want to show an archive of the author's posts ONLY IF the current User is the author. The code I provided before can do that. Go to Toolset > WordPress Archives and create a new "Author" archive if one does not already exist. In the Loop Output area of this WordPress Archive, copy and paste this code:

[wpv-layout-start]
Post Author: [wpv-post-author format="name"]
-- Add your profile information here --
	[wpv-items-found]	
<!-- wpv-loop-start -->
[wpv-conditional if="( '[wpv-current-user info='name']' eq '[wpv-post-author format='name']' )"]
	<ul class="wpv-loop js-wpv-loop">
		<wpv-loop>
			<li>
				[wpv-post-link]
			</li>
		</wpv-loop>
	</ul>[/wpv-conditional]
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]
#600892
S.png

Thank you very much again Cox...

For some reason, right now the "Author Link" in the Post loop, links to the Current Logged in User's Account Page.

Could you please help me to link it to the Author's Profile?
...Well, after I create a VIEW for all the Authors' Profiles/Author Archive correct?

Furthermore, I still wouldn't want to the Authors' Profiles/Author Archive to List any Posts at all.
Each Author already has a Page called "My Projects" where their Custom Posts are listed.

Please see image attached.

Thanks again!

#600904

For some reason, right now the "Author Link" in the Post loop, links to the Current Logged in User's Account Page.
How did you add this link? Can you share the exact shortcode you used in this View? The proper shortcode is:

[wpv-post-author format="link"]

More information about his shortcode: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-author

...Well, after I create a VIEW for all the Authors' Profiles/Author Archive correct?
On the "Shared with Me" page you display a View of Posts, with links to the Author's archive page. This View is already created, if I understood you correctly. This is the only View you need. You will use a WordPress Archive to display the Author's profile information, not a View.

Furthermore, I still wouldn't want to the Authors' Profiles/Author Archive to List any Posts at all.
Okay I misunderstood you. Change the Loop Output in the WordPress Archive to remove all Posts and conditionals, since you never want to display a list of Posts on the Author archive page:

[wpv-layout-start]
Post Author: [wpv-post-author format="name"]
-- Add your profile information here --
    [wpv-items-found]   
<!-- wpv-loop-start -->
        <wpv-loop></wpv-loop>
    <!-- wpv-loop-end -->
    [/wpv-items-found]
    [wpv-no-items-found]
        <strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
    [/wpv-no-items-found]
[wpv-layout-end]
#600941

Thank you for the Short-Code and the clarification Cox.

I think I finally got what you mean:

The "WordPress Author Archive" would be where Viewers see, the Data of the Authors Profile, but I will customize it, to remove all posts and display the Profile Values according to each Author. Correct?

If so, where should I go to "Change the Loop Output in the WordPress Archive" ?
I mean where should I insert this code?
[php]
[wpv-layout-start]
Post Author: [wpv-post-author format="name"]
-- Add your profile information here --
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop></wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]
[php]

#600953
Screen Shot 2017-12-21 at 2.51.12 PM.png

If so, where should I go to "Change the Loop Output in the WordPress Archive" ?
In wp-admin, go to Toolset > WordPress Archives. Check to see if any WordPress Archive has been assigned to the "Authors archive" yet. You can quickly determine this by looking in the center column. If an author archive already exists, edit that archive. If no author archive exists, create a new one. You will find a Loop Output editor inside where you can place the loop code. See the attached screenshot.

#600957

AWESOME! Thank you very much Cox!
I'll get to it!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.