Community Forums › Forums › Design Tips and Tricks › Replacing 'Return to top of page' with an image
Tagged: return to top of page
This topic contains 13 replies, has 2 voices, and was last updated by sebgates 4 months ago.
-
AuthorPosts
-
January 18, 2013 at 7:18 am #12829
Has anyone used anything other than text to allow visitors to go back to the top of the page by pressing the text in the footer? I would like to use an image with text. Can anyone help?
January 18, 2013 at 2:11 pm #12920You could set an image as the background and then indent the text so it’s hidden or follow this to edit the function.
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 18, 2013 at 3:36 pm #12945I added the following code to the bottom of the functions php file:
/** Customize the return to top of page text */
add_filter('genesis_footer_backtotop_text','custom_footer_backtotop_text');
functioncustom_footer_backtotop_text($backtotop) {
$backtotop='[footer_backtotop text="Return to Top"]';
return$backtotop;
}Nothing happened: http://report.xl-websites.com/
I did the same with the code snippet that changes ‘Speak you mind’ and it worked.
It is not a big problem, but I would like to be able to add an icon of an arrow pointing up if possible. I am no expert in PHP but happy to give something a go if you have an easy solutions.
January 18, 2013 at 3:40 pm #12948If what you added is exactly what you just posted then you didn’t edit anything since it still just outputs “Return to top”. Replace the shortcode with an image tag or add your image as the background of the div.
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 18, 2013 at 3:46 pm #12952Sorry bro, I am a novice at PHP and only 2 weeks in to Genesis. I changed the text to ‘Back to top’ (3rd line at the end of the line) and nothing happened.
Out of the following code, what do I change to make the text different?
add_filter('genesis_footer_backtotop_text','custom_footer_backtotop_text');
functioncustom_footer_backtotop_text($backtotop) {
$backtotop='[footer_backtotop text="Return to Top"]';
return$backtotop;
And where would I add the background image, to the css rule or to this php code?Thanks for your patients
January 18, 2013 at 4:05 pm #12964The shortcode is ‘[footer_backtotop text="Return to Top"] The text returned is “Return to Top”. And all style rules should be added to the style sheet, style.css. You can use Firebug to determine the rule to edit but it’s .gototop
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 18, 2013 at 4:12 pm #12969Thanks, it still does not change the linking text in the footer
This is my first attempt at building a theme using Genesis and I have made loads of errors getting to know my way around. I may have hacked something without knowing what I was doing. I will implement the short code first thing on the next design. Thanks for your time.January 18, 2013 at 4:16 pm #12970Post the contents of your functions.php so I can see what else is in there. And what is the URL?
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 18, 2013 at 4:24 pm #12973This reply has been marked as private.
January 18, 2013 at 5:54 pm #12996That Username/PW combo isn’t getting me in
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 18, 2013 at 5:54 pm #12997Sorry bro, I had not heard from you for a while and deleted it. I will set it up again with same details.
January 18, 2013 at 5:58 pm #12998This reply has been marked as private.
January 18, 2013 at 6:02 pm #13000One of your plugins is conflicting. Deactivated all of them and the change showed up.
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 18, 2013 at 6:03 pm #13001ok, no worries, thanks again
-
AuthorPosts
You must be logged in to reply to this topic.