Community Forums › Forums › Archived Forums › Design Tips and Tricks › Trying to change the text on the "Return to top" link
- This topic has 6 replies, 4 voices, and was last updated 12 years, 8 months ago by
giraffeweb.
-
AuthorPosts
-
March 14, 2013 at 9:04 am #26182
Cesc Vilanova
MemberHi,
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 #26188AnitaC
KeymasterMake 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.
Need help with customization or troubleshooting? Reach out to me.
March 14, 2013 at 9:28 am #26190Cesc Vilanova
MemberThanks 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 #26205AnitaC
KeymasterRe-copy MY code. Don't use yours. Remove it and copy and paste mine.
Need help with customization or troubleshooting? Reach out to me.
March 14, 2013 at 12:01 pm #26235csbeck
MemberOr you could try the Genesis Simple Edits plugin.
Just a thought.
March 15, 2013 at 2:40 am #27020Cesc Vilanova
MemberThanks 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 #36924giraffeweb
ParticipantDid 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
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.