Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #1401839

    Hey guys,

    I would need to customize the anchor link target from Enfold’s “back to top” on one specific page of a website only. The page’s id is 2077 and the link should go to #locations instead of #top.

    I tried following code which did not do the trick:

    add_filter( 'av_back_to_top_href', 'custom_back_to_top_link', 10, 1 );
    function custom_back_to_top_link( $href ) {
        // Only modify the link on page with post ID 2077
        if ( is_page( 2077 ) ) {
            // Change the URL to the ID of your custom anchor
            $href = '#locations';
        return $href;

    Any improvement or different solution to that?

    Thx in advance & Best Regards,


    Hi Michael,

    The hook you used does not exist so it will not work.
    I think you’ll need to use a child theme and then copy footer.php from the parent theme to the child theme and make changes on line 328:

    <a href='#top' title='<?php _e( 'Scroll to top', 'avia_framework' ); ?>' id='scroll-top-link' <?php echo av_icon_string( 'scrolltop' ); ?>><span class="avia_hidden_link_text"><?php _e( 'Scroll to top', 'avia_framework' ); ?></span></a>

    You can use the conditional tag to set it to change href on page 2077.
    Hope this helps.

    Best regards,


    try in your child-theme functions.php:

    function change_href_from_scroll_top_link(){
    if ( is_page(2077) ) {	
    <script type="text/javascript">
    window.addEventListener("DOMContentLoaded", function () { 	
    (function($) {
    		'href': 'https://new_link',
    		'title': 'new Title',
    add_action('wp_footer', 'change_href_from_scroll_top_link');

    if you got more than one page use array:
    if(is_page(array( 2077, 38147, … ))){

    see test page: https://enfold.webers-webdesign.de/impressum/



    Thanks for helping out @guenni007 :-)

    Best regards,


    The solution @Guenni007 provided works perfectly: https://www.trabitsch.at/locations/

    Thanks – Danke Günter! ✌🏻


    Schön – mach doch noch die letzte Color-Section auch in dem dunklen Blau – der Breite Abstand stört ein wenig. Dann kann man auch den Trenner sehen.

    Der weiße Border kommt dann vom:

    .container_wrap {
      border-top-style: solid;
      border-top-width: 1px;

    den schmeiß ich auch immer direkt raus ( also auf border-top: none )

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.