AI Search
Classic Search
Notifications
Clear all
Mar 27, 2021 11:05 am
Hello all,
Is there a way to change the target link of the “Shop account” button in the user’s profile page?
Thank you!
16 Replies
Mar 27, 2021 12:19 pm
you can use this code
add_action( 'wp_head', function () { ?>
<script>
jQuery(document).ready(function($) {
$(".wpforo-profile-home .wpf-field-type-url a[href^='http']").attr('target','_blank');
});
</script>
<?php } );
either via How to Easily Add Custom Code in WordPress (without Breaking Your Site)
or in the functions.php of your WP theme
replace " _blank " with the target you want
Apr 03, 2021 4:40 pm
I used snippets plugin and activated the above code, but it didn't work.
The target link has not changed.
I don't know if I missed anything, but I followed the steps as described.
More specific:
The current link of "Shop account" button in user profile is 'https://mysite.com/my-account/' and I would like to change it to: 'https://mysite.com/myshop/'
Thank you again for your time.
