Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #3846427
Internal link and sticky bar header
Open

Comments

  • Shih-yu Hsu started the conversation

    Hi, I'm currently adding the internal link for articles that have some footnotes. However, when I return to the article from the footnote, the correct sentence where I should return to will be blocked by the sticky bar header. Is there any possible way to fix this? 

  •  2,781
    PenciDesign replied

    Hi,

    Please send me the screenshot and take notes. I will review them and provide you with a quick solution.

    Regards,
    PenciDesign.

  •   Shih-yu Hsu replied privately
  •  2,781
    PenciDesign replied

    Hi,

    Please go to dashboard → Soledad → Ads Manager → Footer → Add Custom HTML code before close </body> tag / Google Analytics Code: add this code:

    $(document).ready(function () {
        $('a[href^="#"]').on('click', function (e) {
            e.preventDefault();
            
            let targetId = $(this).attr('href').substring(1);
            let target = $('#' + targetId);
            let headerHeight = $('.penci_header').outerHeight();
            
            if (target.length) {
                $('html, body').animate({
                    scrollTop: target.offset().top + 30 + headerHeight
                }, 800);
            }
        });
    });

    Regards,
    PenciDesign.