• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Replacing 'Return to top of page' with an image

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Replacing 'Return to top of page' with an image

This topic is: not resolved

Tagged: return to top of page

  • This topic has 13 replies, 2 voices, and was last updated 13 years, 6 months ago by sebgates.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • January 18, 2013 at 7:18 am #12829
    sebgates
    Member

    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 #12920
    SoZo
    Member

    You 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 #12945
    sebgates
    Member

    I 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' );
    function custom_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 #12948
    SoZo
    Member

    If 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 #12952
    sebgates
    Member

    Sorry 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' );
    function custom_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 #12964
    SoZo
    Member

    The 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 #12969
    sebgates
    Member

    Thanks, 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 #12970
    SoZo
    Member

    Post 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 #12973
    sebgates
    Member
    This reply has been marked as private.
    January 18, 2013 at 5:54 pm #12996
    SoZo
    Member

    That 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 #12997
    sebgates
    Member

    Sorry 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 #12998
    sebgates
    Member
    This reply has been marked as private.
    January 18, 2013 at 6:02 pm #13000
    SoZo
    Member

    One 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 #13001
    sebgates
    Member

    ok, no worries, thanks again

  • Author
    Posts
Viewing 14 posts - 1 through 14 (of 14 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble