Some Contents Missing

This topic contains 22 replies, has 2 voices, and was last updated by Alex Meda Alex Meda 3 years, 2 months ago.

Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • #30963
    Alex Meda
    Alex Meda
    Participant
    You cannot access this content.
    #30971
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #31002
    Alex Meda
    Alex Meda
    Participant
    You cannot access this content.
    #31008
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thanks! It was actually there, but the siteground optimizer moved it to an external file for caching, I could not see it there.

    I made a change to the actual script file, which may actually work, the final code is now:

    add_action('wp_footer', 'asp_custom_wp_footer');
    function asp_custom_wp_footer() {
      ?>
      <script>
      jQuery(function($) {
        var t;
        $('.asp_main_container').on('asp_search_start', function(){
            clearTimeout(t);
            var $this = this;
            t = setTimeout(function(){
    			$('body,html').animate({'scrollTop': $($this).offset().top - 240}, {"duration": 240});
            }, 50);
        });
      });
      </script>
      <?php
    }

    I had to disable the scroll to results feature for this to work. Please note that I cannot guarantee this code to work in all cases on all search bars. For further improvements, you may have to consult with an external developer as well.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #31037
    Alex Meda
    Alex Meda
    Participant

    Thanks a lot I quickly tested it out with most of my search instances active on the frontend and the code seems to be working just as I expected 🙂
    But I will make sure to run some other tests a week later to make sure that it is permanent solution before moving the code to live website.

    Have a great week.

    #31147
    Alex Meda
    Alex Meda
    Participant
    You cannot access this content.
    #31150
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Sure, I mean this feature, it has to be turned off: https://i.imgur.com/7IiAZXq.png
    I see the code there, it actually does the thing, but because of that option it is not visible. Once you turned it off and cleared the cache it will be okay.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #31186
    Alex Meda
    Alex Meda
    Participant

    Hi,
    I didn’t get the chance to update you last week but the solution that you implemented on live site is working fine 🙂
    Thanks a lot and have an amazing week.

Viewing 8 posts - 16 through 23 (of 23 total)

You must be logged in to reply to this topic.