Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1224331

    Hello,
    I need to add a back button to the all posts

    #1224347

    Hey Melanie,

    There are some suggestions here, maybe one of them will work for you? https://wordpress.org/support/topic/a-working-back-to-previous-page

    Best regards,
    Jordan Shannon

    #1224417

    Hello Jordan
    Thank you for your answer, I just want to know where to put the following code to display it in all post

    <button class=”button-back” onclick=”goBack()”>Go Back</button>

    <script>
    function goBack() {
    window.history.back();
    }
    </script>

    #1224423

    Hi,

    Please provide admin info so we can look into this issue further.
    Best regards,
    Jordan Shannon

    #1225397

    Sorry, I dont need the button in all the posts, I need the back button on the menu

    #1225525

    Hi,

    Okay, well you can add the code to header.php and then use css to position it from there.

    Best regards,
    Jordan Shannon

    #1225702

    ok, I will try to do it and let you know thank you

    #1225703

    Hi,

    No problem!

    Best regards,
    Jordan Shannon

    #1225706

    I found a solution
    /*CUSTOM Menu back button*/
    add_action( ‘wp_footer’, ‘tompai_back_button’ );
    function tompai_back_button(){
    ?>
    <script type = “text/javascript”>
    jQuery(document).ready(function(){
    jQuery(“#menu-item-3656 a”).attr(‘onclick’, ‘window.history.go(-1);’);
    });
    </script>
    <?php
    }
    /* END CUSTOM BACK BUTTON*/

    #1225880

    Hi mela1989,

    Glad you got it working for you and thank you for sharing! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

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