Hello @tudodemotos
Thank you for reaching out to us, The Fipe API uses a script to fetch and generate a form for it, the custom JavaScript is not allowed in AMP pages. However, you can embed the script using the amp-iframe tag.
Please follow the below steps:
1) Create a file in your website’s wp-content directory and call it fipe-table.html
2) Open fipe-table.html and add the following code in it
<script async src="https://www.tabelafipebrasil.com/api/js/tabelafipe-widget.min.js"></script> <div class="tfb-query" data-style="4" ></div>
3) Now log in to the WordPress backend, open the page where you wanted it to embed, and add a custom HTML block.
add following code in it
<amp-iframe
width="200"
height="500"
sandbox="allow-scripts"
layout="responsive"
frameborder="0"
src="/wp-content/fipe-table.html"
>
</amp-iframe>
You should be able to find it working in AMP pages. You can add similarly on widget pages.
We hope this helps!
It works!
Thank you so much!