The recommended method for embedding iframes is using the <iframe> tag. It makes for better syntax and also allows you to control the iframe much better.
For example, you are able to remove an iframe’s border, control scrolling options, etc.
<iframe src="https://jsfiddle.net/o7usdL0a/embed/result/" style="width: 100%; height: 300px"
scrolling="no" marginwidth="0" marginheight="0" frameborder="0">
</iframe>
The <script async> and the <iframe> methods are both the same when it comes to site performance as they are both asynchronous. If you use the tag it will load asynchronously by default, so no need to worry about blocking code.
Related Posts:
- How do you use JavaScript to detect the homepage
- Storing posts from query and accessing later via AJAX call
- JS innerhtml changing style when using AJAX
- Passing total post count to javascript
- Default post showing more than intended
- Restrict custom post type to only site administrator role
- How to force one column layout on custom post type edit page?
- Make featured image required
- previous_post_link() and next_post_link() with a custom post type?
- Setting a custom sub-path for blog without using pages?
- WordPress REST Create Post of Custom Type
- Limit the post for differents custom post type in the same wp_query
- Assigning a role to a specific custom post type (and ignoring other post types)
- Display posts in random post types
- Multiple Content Block
- Display Custom Post Type in Recent Posts
- IF statement in a do_shortcode
- Slug for standard post post_type
- Make `previous_post_link()` Function Show The Post After Next i.e. Jump A Post
- How do I create an archive page for standard posts?
- Remove parent from custom post type
- Remove All, Published and Trashed Post Views in Custom Post Type
- How can I show a custom post type for users in the authors.php file?
- Blog page showing same content as homepage
- Need help targeting a custom post type with conditional tags
- How to add post_type=value when editing that post type in the WordPress admin?
- Open Custom Post Type as PDF
- Show custom post type filtered by category
- Allow non-logged in users to see a future post after clicking on a list of future posts
- Meta query for custom post type ignored in main query
- Update Post Meta for a logged in user
- Get related posts of child term of custom post type
- How to change the post type a theme shows by default?
- Permalink misbehaving in Custom Post Types
- Custom Post Type Slick Slider “$ is not a function”
- Is it a good idea to add a column to the posts table?
- Can I change my post type to anything and my site still work?
- Display Only Certain Category In a Custom Page Template
- Creating separate feeds for custom post types
- wordpress lists similar type of posts in a custom post type
- Get data from PHP to JavaScript to set position of each post on front page
- Auto post creation
- How to filter url on post submission?
- Easy reading or transfer of data from posts?
- Different structure/content for posts from a custom post type
- list posts of two post types in a single template
- The loop does not show users
- How to controll the Posts post type and general wondering about WP data structure
- Front-end Image Upload to Custom Meta Box
- Create a custom post type based on ‘Post’
- redirect after submiting post for review
- Invalid content when I try to import custom post type from the old template wordpress
- Why is my custom post content only viewable when signed into WordPress?
- i need to have a tab with gategory post
- Custom Post type to Woocommerce Product type
- Add a form in every post and save data in post meta
- How to set post date in post_type so that it’s same as latest post in category
- Enforcing a rigid reusable template structure for similar posts?
- Auto delete pages/posts without views
- Right way to store a large set of similar information on website? [duplicate]
- Create a post automatically if search result has zero results
- Limiting the Number of User Posts to Their Own Posts
- Correct way adding External classes to Custom Post type and output their methods to template
- How to use posts as tabs in a custom page?
- dynamic vue widget inside custom post
- Assign a Post to a User
- Cannot save pages after migration
- Bulk trashing post ‘fails’
- Cache the registration of a custom post type?
- News post with multiple permalinks? When opened from different page
- Rest Api not working with Iframe in form data
- Limit posts per page depending on the size of a div?
- Display title of all custom posts from same taxonomy term on a custom post template
- Use WP pagination functions on a custom page template
- is using “require_once” in wordpress theme affect the speed ???
- Event Manager: Events Deleted are still in DB as published but hidden in admin
- Rewrite url post_tag for custom post type
- Setting up a page to house certain types of posts
- Single Post (CPT) in two pages – Normal and Extended
- Limit or filter edit view in the dashboard to a specific ID only?
- How to add New Post On clicking a button?
- Featured image in custom post is being disabled
- How to set class to “current-page” on the currently viewed single post within a CPT
- Why isn’t my custom post type using the corresponding custom post template?
- WordPress Author Posts Review After Every Change In The Same WordPress Post
- Linking custom taxonomies and posts
- Search page for custom post type
- Query Only Show Text on Posts With Certain Taxonomy Tag
- how to remove user name and date in post page
- Post type cloud like tag cloud?
- Change permalinks for posts but not custom post type?
- How to make a template for a specific post of a custom post type?
- Display posts from another page on home page in wp-editor
- How do I hide single category post on my post page
- Front end post or photo or both
- Canot save post if any meta box was empty
- display posts, pages and custom post types from another wordpress site
- How to develop Knowledge center in WordPress Website
- Drawbacks of making the default post-type: post hierarchical [closed]
- ACF – Tags not showing up in Custom Post Types