• Hello,
    I put the shortcode in the header template header.php
    <div id=”hcontrast” class=”contrast-button”><?php echo do_shortcode( ‘[wpa_toolbar]’ ); ?></div>
    when i press on the contrast icon in the header every thing work fine
    but when i move to another page i c’ant disable the contrast after the page is reloded


    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Joe Dolson


    What browser are you using? I just tried to recreate this on your site using Firefox and wasn’t able to reproduce the issue.

    Thread Starter Shalom Cohen


    I using chrome but the problem apear also in firefox.
    I solved that with this code:
    const hcb = document.querySelector(‘#hcontrast .a11y-toolbar-widget .toggle-contrast’)
    if(document.body.classList.contains(‘contrast’)) {
    hcb.setAttribute(‘id’, ‘is_high_contrast’)

    Plugin Author Joe Dolson


    Sounds good! I’ll consider this resolved, then.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcode in header template’ is closed to new replies.