h5p inside a custom post type using Advance Custom Fields

Created a new post type and created new fields and removed the default WordPress content

Then I added the shortcode [h5p id="1"] into my custom post inside a custom field

the page is not displaying the audio recorder unless I use embed using an iframe.

The page looks blank and when inspected this is the only thing displayed

<div class="h5p-iframe-wrapper"><iframe id="h5p-iframe-2" class="h5p-iframe" data-content-id="2" style="height:1px" src="about:blank" frameborder="0" scrolling="no"></iframe></div>

 

Attachments: 
BV52's picture

Hi dakgrenzenlos,

Which block type did you use? In WP there is a specific block for shortcodes.

-BV52

I'm using the WYSIWYG field on ACF do I have to create using just text field, but that would just display it as plain text?

<?php 
						$recodblock = get_field('shortcode_area', false, false); 
						$recodblock = apply_filters('the_content', $recodblock);
						echo $recodblock;?>	

I even used the code above but still, a blank Iframe is being displayed

 

Attachments: 
icc's picture

I'm not familiar with ACF but the shortcodes can be used anywhere that supports shortcodes.