Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1103867

    Hi guys

    Trying to work out in Admin how to tell the theme to reload an active page when that menu item is clicked. Seems to work fine in other WP themes :)

    Site in question is below.
    Thanks

    #1104701

    Hey pantoni,

    Try to remove the #top bit from your links and try again. I tried logging in but the details you posted are not working.

    Best regards,
    Rikard

    #1104714

    Hi Rickard
    I’ve removed the #top from the code but still not working on the individual Case Studies posts.
    There’s no logging in required – the site is live and Case Study example is a per below…

    Thanks

    #1105964

    Hi,

    Thank you for contacting us.

    The theme is working as intended but if you like to change the default behavior please add the below code to your child theme functions.php file.

    function reload_active_link(){
    ?>
    <script>
    jQuery(document).ready(function(){ 
      
    jQuery('#header ul:first-child > li.current-menu-item > a').click(function() {
        console.log('Active link was clicked');
        location.reload();
    });
    
    });
    </script>
    <?php
    }
    add_action('wp_head', 'reload_active_link');

    Best regards,
    Vinay

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