XF 1.5 XF Profile Link -> Wordpress

Historical

Member
Hey,

As the title says, how would I add a generic link to Wordpress that points any logged on user to their XenForo profile? I've googled and looked at some threads here but none of them work, I've tried {user_id} etc.

Thanks
 
A generic hardcoded link to redirect logged in visitors to their public XenForo member profile?

Not possible out of the box - the problem is the user ID. You need at least the User ID to view a profile.

In XF2 template account_wrapper the link is:
Code:
<a class="blockLink" href="{{ link('members', $xf.visitor) }}">{{ phrase('your_profile') }}</a>

Of course that won't work outside of XenForo templates.

I think you’ll need to get a plugin developed to create a generic custom XF URL which can then parse the above.

Alternatively maybe you can try making a XF Page (which you would link to from WP) and then insert an HTTP Meta Refresh into <head> via <xen:container> to redirect to the above link. It would be messy though as user would have to wait for the redirect depending on how long you set the timer.

I’m not sure if XF pages have access to templates.
 
Back
Top Bottom