Linking from author.php to UserPro profile – UserPro Forums https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/feed/ Fri, 17 May 2024 04:29:03 +0000 https://bbpress.org/?v=2.6.2 en-US https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28029 <![CDATA[Linking from author.php to UserPro profile]]> https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28029 Sat, 15 Mar 2014 23:41:36 +0000 Foreigner The theme I use (Enfold) comes with a multi-author blog page with gravatars. Gravatars produced through UserPro work nicely on that page. However, UserPro permalinks don’t, so, for example, if I do a 301 redirect from author.php to the UserPro’s profile page, the links may or may not work, regardless of the type of permalink (e.g., username, full name, user ID) I choose. One problem is the period (dot) in usernames from a social network (which most any author.php converts to a dash). I’ve tried different combinations, and nothing works consistently.

So I’m thinking that a good alternative would be to try to link from just one element–the gravatar–in the output from the theme author.php file to the author’s profile page produced by UserPro. I’d think that’s be something easy for a programmer, but I’m not a programmer. How to make this work? I would assume I’d add some filter to my functions.php file, but what and where?

I’m attaching my theme’s author.php file in the event someone knows how to accomplish this. I’ve been trying to get the blog to connect correctly to UserPro on and off for a month now without success, so any hints are welcome.

Thanks.

]]>
https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28030 <![CDATA[Reply To: Linking from author.php to UserPro profile]]> https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28030 Sat, 15 Mar 2014 23:47:55 +0000 Foreigner And this is the loop-author.php page:

]]>
https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28031 <![CDATA[Reply To: Linking from author.php to UserPro profile]]> https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28031 Sun, 16 Mar 2014 00:00:00 +0000 Foreigner By the way, if getting UserPro to work with a theme’s blog is “custom” work, I’d certainly be willing to pay to get it working correctly and consistently. Thanks.

]]>
https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28060 <![CDATA[Reply To: Linking from author.php to UserPro profile]]> https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28060 Sun, 16 Mar 2014 08:43:31 +0000 admin Hi Foreigner, I am lost here. What can I help you with? Sorry

]]>
https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28137 <![CDATA[Reply To: Linking from author.php to UserPro profile]]> https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28137 Sun, 16 Mar 2014 16:29:46 +0000 Foreigner Hi Ahmed. It’ll be more clear–I hope–when seen in action. For the moment, I’m going to use the Enfold demo, as I haven’t changed a thing from the theme’s default coding (and my site is not yet ready).

Here’s the blog page. Note that the avatar is a feature of the theme. UserPro’s profile photo replaces this perfectly. So far so good.

Blog Multi Author

Click on the profile photo or author name and you get the output of author.php for that author.

http://www.kriesi.at/themes/enfold/author/kriesi/

What I’m trying to do is to link the profile pic (avatar) on this page (i.e., within author.php) to the author’s full profile on the UserPro profile page. That’s about it.

One reason I’m trying to do this is because linking from the blog directly (using a 301 redirect from author.php to /profile) to UserPro doesn’t work for some of the users some of the time because the permalinks either work only with names with no periods in them or with names with periods–bot not both.

Thanks.

]]>
https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28149 <![CDATA[Reply To: Linking from author.php to UserPro profile]]> https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28149 Sun, 16 Mar 2014 17:48:20 +0000 Foreigner To clarify: The permalink structure on UP’s global settings do not work on this particular theme’s author page because the UP settings do not override the default theme setting in this instance, which is username. So, for example, if I change permalinks to User ID, the author page will still use username. Even if I use username in the UP settings, all usernames with periods in them (Facebook names, for example) will not direct to the UP profile page because a hyphen (dash) replaces the period. In other words, it’s not a UserPro problem by itself. Rather, it’s the combination of UP and this theme.

That’s one reason I’m asking how the UP profile can be linked to from the author page.

]]>
https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28299 <![CDATA[Reply To: Linking from author.php to UserPro profile]]> https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28299 Mon, 17 Mar 2014 15:13:14 +0000 Foreigner https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28398 <![CDATA[Reply To: Linking from author.php to UserPro profile]]> https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28398 Mon, 17 Mar 2014 21:37:42 +0000 enigma666666 I sat the whole day today with a similar problem, but in my case, the author is a custom post type “agent” , resulting in permalink to be /agent whereas Userpro link is /profile, so I went into the post type functions and changed the slug from “agent” to “profile”.

So I changed this:
'rewrite' => array( 'slug' => __('agent')

To this:
'rewrite' => array( 'slug' => __('profile')

I also added support for author to my custom post type as “author” was not supported.
'supports' => array('author','title','editor','thumbnail'),

This solved my permalink problem. I then had to find a way to display the rest of the “agent” page content on the USERPRO profile page, so I edited the “postbyuser” template and added my “agent” page php code inside it and then used short code for postbyuser on profile page. This results in content from my original agent page, now diplaying perfect on the Userpro Profile page. So I basically now use postbyuser template to display all the “author page content”.

Perhaps your theme is also using a custom post type for the authors, if so then the above code change will maybe help you solve your problem, else adding your author.php file content to postbyuser template, might solve your problem.

]]>
https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28400 <![CDATA[Reply To: Linking from author.php to UserPro profile]]> https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28400 Mon, 17 Mar 2014 22:24:47 +0000 Foreigner Hi Enigma. Thanks for trying to help–I appreciate it. What you say makes sense; unfortunately, the theme I’m using does not use a CPT for authors (in other words, it’s WordPress default as far as that part is concerned). I actually do think it’s something quite simple, but I just can’t see it.

]]>
https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28403 <![CDATA[Reply To: Linking from author.php to UserPro profile]]> https://forum.userproplugin.com/forums/topic/linking-from-author-php-to-userpro-profile/#post-28403 Mon, 17 Mar 2014 22:45:57 +0000 enigma666666 I found this code, it might help: (wish I found it earlier, after sitting for hours on end editing code…lol)

function change_author_permalinks() {

global $wp_rewrite;

// Change the value of the author permalink base to whatever you want here
$wp_rewrite->author_base = 'profile';

$wp_rewrite->flush_rules();
}

add_action('init','change_author_permalinks')

`

]]>