• Resolved blogforum

    (@blogforum)


    I have WordPress 4.9.1 and I noticed that when I click the link of the recent comments in the sidebar, the link does not work.

    • This topic was modified 7 years, 3 months ago by blogforum.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi,

    Sorry for the delay. From our testing, it seems to be working fine in WordPress 4.9.1. Have you tried disabling other plugins on your site to check in case it’s another plugin causing a conflict?

    Thanks,

    Andy

    Thread Starter blogforum

    (@blogforum)

    All plugins are inactive (only Better recent comments run). Link mistake.

    Hi,

    Do you have a link to your site I can check?

    Thread Starter blogforum

    (@blogforum)

    https://albenessereblog.altervista.org Safari, OS Sierra

    The problem is in home page sidebar.

    • This reply was modified 7 years, 3 months ago by blogforum.
    • This reply was modified 7 years, 3 months ago by blogforum.

    Hi,

    It’s not an error in our plugin. You have some Javascript on your page which is causing an error when you click on links containing a page fragment (#). That’s why they’re not working. You can see a screen grab of the error here: https://prnt.sc/hjeeit

    This is the code causing your problem:

    // Fa saltare lentamente in basso sino alla fine degli articoli
    jQuery(document).ready(function($) {
    $(“a”).on(‘click’, function(event)
    {
    if (this.hash !== “”) {
    event.preventDefault();
    var hash = this.hash;
    $(‘html, body’).animate(
    {
    scrollTop: $(hash).offset().top
    }, 1000, function() {
    window.location.hash = hash;
    });
    }
    });
    });

    Thread Starter blogforum

    (@blogforum)

    Yes, how I can to do?

    I’m not sure. It looks like this code is part of your theme, so you could reach out to the theme author and ask for their assistance. As it’s not part of our plugin, it’s not really something I can advise on.

    Thanks,
    Andy

    Thread Starter blogforum

    (@blogforum)

    I put it that works only with the toggle menu

    Hi,

    What you could do is add a selector to your on click event handler, so that it only works for the toggle menu. E.g.

    // Fa saltare lentamente in basso sino alla fine degli articoli 
    jQuery(document).ready(function($) {
      $("a").on('click', '#site-navigation', function(event) 
      {
        if (this.hash !== "") {
          event.preventDefault();
          var hash = this.hash;
          $('html, body').animate(
          {
            scrollTop: $(hash).offset().top
          }, 1000, function() {
            window.location.hash = hash;
          });
        } 
      });
    });
    
    Thread Starter blogforum

    (@blogforum)

    So it does not create conflict with your plugin, but there is no slow scroll.

    Hi,

    Sorry, I can’t really help you with this as it’s not related to our Better Recent Comments plugin. If you’re struggling with the code, I would recommend getting a developer on this to help. I would recommend “Codeable.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Link in sidebar does not work’ is closed to new replies.