Community Forums › Forums › Design Tips and Tricks › Trying to change the text on the "Return to top" link
This topic contains 6 replies, has 4 voices, and was last updated by giraffeweb 1 month ago.
-
AuthorPosts
-
March 14, 2013 at 9:04 am #26182
Hi,
I’m trying to change the text on the “Return to top” link on my Modern Portfolio based site.
I’ve pasted this code:
// Customize the return to top of page text
add_filter( ‘genesis_footer_backtotop_text’, ‘custom_footer_backtotop_text’ );
function custom_footer_backtotop_text($backtotop) {
$backtotop = ‘[[footer_backtotop text="Return to Top"]]’;
return $backtotop;
}…that I found on GitHub, to my functions.php file of my child theme but it doesn’t seem to work.
Any advice at what I could be doing wrong?
This is the site I’m trying to implement this.
Thanks in advance!
Cesc.
March 14, 2013 at 9:21 am #26188Make sure your quotes and apostrophes are the correct ones. Sometimes, they don’t copy over correctly. Copy and paste into Notepad, verify and fix – then apply the code again to the Functions file.Scrap that – your code looks wrong. It should be:
/** Customize the return to top of page text */ add_filter( 'genesis_footer_backtotop_text', 'custom_footer_backtotop_text' ); function custom_footer_backtotop_text($backtotop) { $backtotop = '[footer_backtotop text="Return to Top"]'; return $backtotop; }You have too many brackets.
Twitter Handles: @thecre8tivediva | Website: Cre8tiveDiva.com | LinkedIn Group: http://goo.gl/nNe1m
Why Not Take The Challenge! – Help us answer some of the unanswered postsMarch 14, 2013 at 9:28 am #26190Thanks for your help!
I’ve removed one [ and the other ] and still doesn’t work though.
I’ve updated the site with the new code.
March 14, 2013 at 10:29 am #26205Re-copy MY code. Don’t use yours. Remove it and copy and paste mine.
Twitter Handles: @thecre8tivediva | Website: Cre8tiveDiva.com | LinkedIn Group: http://goo.gl/nNe1m
Why Not Take The Challenge! – Help us answer some of the unanswered postsMarch 14, 2013 at 12:01 pm #26235Or you could try the Genesis Simple Edits plugin.
Just a thought.
March 15, 2013 at 2:40 am #27020Thanks to both of you for your help.
Anitac, I have used your code (I only changed the “return to top” text, of course) and it doesn’t work either
Csbeck, I was using Genesis Simple Edits. This is the code I’ve put in my Footer Output field.
<div class=”gototop”><p>[footer_backtotop]</p></div>
<div class=”creds”><p>Copyright [footer_copyright] </p></div>I understood that the code above requires me to change the function where the text is set. Maybe I’m wrong. I’m a total newbye
PD: The site is now at http://www.menthoria.com
April 22, 2013 at 12:23 pm #36924Did you find a solution to this? I found the “Return to Top of Page” text set in the Genesis/lib/shortcodes/footer.php. It appears that no matter what you put in theme’s function file, or using simple edits, the Genesis setting is taking precedence over our custom settings. I have tried all the above solutions you have and cannot get this to change to just “Top” like it is in the Fabric theme.
Judy
-
AuthorPosts
You must be logged in to reply to this topic.