Skip Navigation

[Résolu] View filter on author page

This support ticket is created Il y a 7 années. 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)

Marqué : ,

This topic contains 8 réponses, has 2 voix.

Last updated by Dido Il y a 7 années.

Assisted by: Minesh.

Auteur
Publications
#508219

Hi Christian,

another question about my site hidden link
The name link is opening the author.php
I see the blogs per user, but how can I print the user specific fields?
I made a view for userfields but I see them all.

hidden link

#508251

Minesh
Supporter

Languages: Anglais (English )

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

Hello. Thank you for contacting the Toolset support.

To display information related to user views offer shortcode [wpv-user]:
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-user

If you are using PHP template file - then please see following:
=> https://toolset.com/documentation/customizing-sites-using-php/creating-custom-user-profiles/

#508265
author-info.png

hi, It is not that I can't provide the user meta, but I want to filter this information for the specific user on the author page.
I want it like on the screenshot.
but now I have all user info on each author page.

#508272

Minesh
Supporter

Languages: Anglais (English )

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

Are you using PHP template to display specific author information - if yes:

<?php
 
  $args = array(
    'id'=>99999,
    'author'=>get_queried_object_id()
    );
    echo render_view( $args );
 
 ?>

Where - replace 99999 with your view ID.

And to your view add query filter - filter by author and select shortcode attribute and give name 'author'

#508407

Hi Minesh,
It is working now, but there is a strange problem left.

Look on this page:
hidden link
When you hover the photo, you see the link with an id.
When you click on Titia Bakker, you got the right view and the slug is rewriting with her name in it.
However, when you click on Kitty van Pel, the slug is not rewriting to the user name. Also the view is not working right.
When I test, the most of the slugs are not rewrited.

How is this possible and how can I fix this?
I looked for differences, even in de database, but I can't find any clue.

#508778

Minesh
Supporter

Languages: Anglais (English )

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

Can I have temporary access details so that I can review how you added link on your page.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

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

#508888

Minesh
Supporter

Languages: Anglais (English )

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

Are you using any Layout or have you created any Layout for user profile - if so - you should remove it and check again.

Which template file you are using to create your custom user profile?

I suggest you follow the steps provided here to create custom user profile:
=> https://toolset.com/documentation/customizing-sites-using-php/creating-custom-user-profiles/

#508894

Minesh
Supporter

Languages: Anglais (English )

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

I've changed the profile link code in your view as given under:

<div class="vib-info"><a href="<em><u>hidden link</u></em>">[avatar user="[wpv-user field="ID"]" size="thumbnail" align="center" /]</a>

And added the shortcode [get_login_slug] to your child theme's functions.php file:


function func_get_user_login() { 
	$login = wpv_do_shortcode("[wpv-user field='user_login']");
     
	return strtolower(str_replace(" ","-",$login)); 
} 
add_shortcode('get_login_slug','func_get_user_login');

Now - I can see all profiles loading with correct template.

#508907

Awesome!

thank you very much

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