• Resolved akkinoida

    (@akkinoida)


    All the HTML tags get converted to amp tags automatically on my blog page but my html Accordion tag is not converting to AMP Accordion tag.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Milind More

    (@milindmore22)

    Hello @akkinoida

    Thank you for reaching out to us, it seems you are using an accordion which relies on JavaScript to work, AMP does not allow custom JavaScript, causing issues with the accordion.

    Instead of the current implementation, we will recommend using the HTML details tag which is AMP compatible and faster compared to JavaScript-based implementation.

    Please check the following example:

    <details>
      <summary>What are the benefits of regular physical activity?</summary>
      <p>Regular physical activity improves cardiovascular health, strengthens muscles and bones, enhances mental well-being, helps manage weight, and reduces the risk of chronic diseases.</p>
    </details>

    You can add the following CSS in Dashboard->Appearance->Customize->Additional CSS to style it

    details[open] > summary {
         list-style: inside "\2212";
         
    }
    
    details > summary {
         list-style: inside "\002B";
    }
    
    details > summary::marker {
         list-style: inside "\002B";
         font-size: 20px;
         color:#6ec1e4;
         font-weight:bold;
    }

    We hope this helps!

    Plugin Support Milind More

    (@milindmore22)

    @akkinoida As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you require any further assistance.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Accordion is not working on AMP pages’ is closed to new replies.