Support Forum
Thank you. It is indeed just an anchor tag. Unfortunately following your instructions of creating sp-user-functions.php and placing it in wp-content leads to:
Warning: Cannot modify header information - headers already sent by (output started at /xxxx/public_html/wp-content/sp-user-functions.php:5) in /xxxx/public_html/wp-includes/pluggable.php on line 1196. Here's the code:
function myProfileButton($out) { $out.= '<a href="/account/" class="spButton">Edit Your Profile</a>'; return $out; } add_filter('sph_ProfileFormBottom', 'myProfileButton', 999);
So I placed the code in my (child) theme's functions.php. That works but the button is a little off to the side:
Ideally I'd like it next to the other two buttons (to the left).
I reckon you did not create a proper php file with the opening and closing php tags on the very first and very last lines of the file...
I don't believe you will be able to positon it alongside those two buttons exactly but I will check. Along with the spButton class also use spRight. See what that does.
YELLOW
SWORDFISH
|
Ah, the closing tag, I am used to editing functions.php, which has no closing tag.
Not sure if anyone would be interested in the final code but here it is:
// ================================================================== // Add Profile Edit Button to Forum Profile Overview // ================================================================== function myProfileButton($out) { $out.= '<div class="spColumnSection spProfileLeftCol"></div><div class="spColumnSection spProfileSpacerCol"></div><div class="spColumnSection spProfileRightCol"></br></br><a href="/account/" class="spButton spRight">Edit Your Profile Details</a></br></br></br></div>'; return $out; } add_filter('sph_ProfileFormBottom', 'myProfileButton', 999);
A bit of CSS to get it properly placed and hopefully visible enough:
#spMainContainer .spProfileOverview .spButton { font-size: 15px; margin-left: 82px; font-weight: bold; }
The result looks like this:
Thanks again for pointing me in the right direction.
1 Guest(s)