Tagged: 

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #368964

    Hey everyone,

    i just tried to implement a “back button” at the main menu of my enfold theme.
    Didn’t worked actually … some issues for me ?
    thanks a lot

    #369078

    Hey tese!

    Here is the javascript you can use to create a “back button”, http://stackoverflow.com/questions/13511679/go-back-button-in-a-page.

    You cannot add it directly to your menu links in the dashboard but if you know the page ID of your link then you can add the functionality in with javascript. Send us a link and let us know which area your wanting to change.

    Regards,
    Elliott

    #369397
    This reply has been marked as private.
    #369667

    Hey!

    It looks like you forgot to include a link.

    Best regards,
    Elliott

    #369924

    hey,

    if i try : window.history.go(-1);

    i get a blankpage in a new window … what should i insert in the link section ?

    #370159

    Hi!

    The link can be set to “#”. The javascript portion needs to be added on the “onclick” attribute.

    Regards,
    Elliott

    #370478

    thanks again – but i didn’t understand where i have to paste the javascript // where i could define the onclick attribute.

    cheerio

    #370519

    I am not sure if i formulate my request correct ;)
    or if i just passed something at the Site, that you recommended to me.

    so i hope you could explain it to me – step by step !

    °Best regards !

    #370762

    Hi!

    Send us a link to your site so we can see the ID of this “zuruck” button and we’ll give you some code to use.

    Best regards,
    Elliott

    #370766

    Hey,

    The Link

    added this few posts ago, but as a private one!

    #371001

    Hi!

    Try adding this to the bottom of your functions.php file.

    add_action( 'wp_footer', 'enfold_customization_back_button' );
    function enfold_customization_back_button(){
    ?>
    <script type = "text/javascript">
    jQuery(docment).ready(function(){
    jQuery("#menu-item-524 a").attr('onclick', 'window.history.go(-1);');
    });
    </script>
    <?php
    }

    Regards,
    Elliott

    #371049

    Thanks :

    Done! But it actually doesn’t work. Did i miss something?

    Best Regards!

    #371079

    Hey!

    There is a typo in Elliot’s code, try with this:

    add_action( 'wp_footer', 'enfold_customization_back_button' );
    function enfold_customization_back_button(){
    ?>
    <script type = "text/javascript">
    jQuery(document).ready(function(){
    jQuery("#menu-item-524 a").attr('onclick', 'window.history.go(-1);');
    });
    </script>
    <?php
    }

    Cheers!
    Josue

    #371117

    Thanks a lot you two !
    Works fine !

    Best regards !

    #371151

    You are welcome, glad we could help :)

    Regards,
    Josue

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘history back button at main menu’ is closed to new replies.