Trying to change the text on the "Return to top" link

Community Forums Forums Design Tips and Tricks Trying to change the text on the "Return to top" link

This topic is: not resolved

This topic contains 6 replies, has 4 voices, and was last updated by  giraffeweb 2 years ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #26182

    Cesc Vilanova
    Participant

    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.

    #26188

    AC
    Blocked

    Make 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.

    #26190

    Cesc Vilanova
    Participant

    Thanks 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.

    #26205

    AC
    Blocked

    Re-copy MY code. Don’t use yours. Remove it and copy and paste mine.

    #26235

    csbeck
    Participant

    Or you could try the Genesis Simple Edits plugin.

    Just a thought.

    #27020

    Cesc Vilanova
    Participant

    Thanks 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

    #36924

    giraffeweb
    Participant

    Did 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

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.