-
Hi!
I’m testing to customize my profile… templates!
I create the folder /userpro/ in my theme, and that is ok!
I copy the view.php, and that is ok!When i’m editing, i see that the template use the page.php. Its possible to make my own template? Or make it use the index.php? Or its possible to make a if (… user pro profile …) so i can include another php and continue with my page normal structure html. Because my profile style is different than page.php.
I test and now i have a solution!
I make the template, and change the template at the page created for profile in wordpress. And now works fine…But how can i get the user name for a profile that is being viewd.
this: <?php echo userpro_profile_data(‘display_name’, $user_id); ?> display the logged user…
if i visit site/profile/Wordpress for example i would like to display in my template the display name for WordPressIf i visit a profile, i need to know how to return that id of user. To make my template works.
I make a template and use in Profile page (that created in pages in wordpress).Its not possible to make a template and apply in a page Profile? I really need to copy the view.php template to use? :/
If you want to retrieve the user ID based on profile being viewed /profile/xxx
you can use
$user_id = userpro_get_view_user( get_query_var(‘up_username’) );
thanks 🙂 tell me if it works please
I found.
http://userproplugin.com/userpro/forums/topic/custom-profile-template-2/With the following parameter, I get $ user_id well and then I can apply my results.
= $ user_id userpro_get_view_user (get_query_var (‘up_username’));Beautiful day.
Thank.To complete:
<? php
global $ userpro;
if (userpro_is_logged_in ()) {
/ / retrieves the user id of the user logged
$ user_id = get_current_user_id ();
Else {}
/ / Get the id of the user Usier not connencte
= $ user_id userpro_get_view_user (get_query_var (‘up_username’));
}
?>
result:
<userpro_profile_data php echo (‘display_name’, $ user_id);?>
etc ….This allows me to display a particular page on the profiles of all users connected or not connected and display a different map ^ ^ for each user. Happy.
You must be logged in to reply to this topic.