Saltar navegación

[Resuelto] Content template for users

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:
How to create templates to display users?

Solution:
WordPress has no such thing, so there is no underlying template for Toolset to modify.

You could modify the theme PHP templates (author.php if it exists, or archive.php), or use an approach described in the documentation where you create profile posts linked to the users and use Content Templates to design the output of these posts.

Relevant Documentation:
https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/

This support ticket is created hace 5 años, 5 meses. 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por zeljko-turkaljS hace 5 años, 5 meses.

Asistido por: Nigel.

Autor
Mensajes
#1286835

Hi, I'm trying to create directory page with all users on WordPress site and on this page showcase only few informations (similar to this - enlace oculto). On read more button I would like to showcase all information from wordpress user, and additional user created fields (enlace oculto).

I don't see option for creating a custom template for users, like I was able to create a custom template for custom post types. How can I create this, is this possible with wordpress users?

Thanks in advance
Sasa

#1287083

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

Hi Sasa

WordPress doesn't have an equivalent to templates for single posts for displaying single users. The nearest equivalent would be an author.php template to display posts by an author, the content of which would be highly theme specific, and most themes don't even bother with an author.php template and just use the same template as for other archives (namely archive.php).

So there is no single user template to intercept and modify as there is for posts.

The options are to create your own author.php templates, which involves writing the required PHP, or you can try the approach outlined in this documentation whereby you create "profile" posts for each user, and you can design templates for these posts in the usual way:

https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/

#1288419

My issue is resolved now. Thank you!