You can’t because it’s a non-secure page http
but you’re loading into an https
page. It’s called Mixed Content
.
Adjust your protocol to //
and hope it renders over https
.
<iframe src="https://creditsmart.in/wp-content/themes/voice/emicalc.html" name="frame1" scrolling="auto" frameborder="no" align="center" height = "300px" width = "100%">
</iframe>
( iframe code modified from @Ittikorn’s answer )
If the file is in your same theme directory it’s possible to create a shortcode:
[emicalc]
Then render the local file:
function emicalc__shortcode( $atts ) {
$content = file_get_contents( get_stylesheet_directory() . '/emicalc.html');
return $content;
}
add_shortcode( 'emicalc', 'emicalc__shortcode' );
If it’s remote you might be able to use wp_remote_get()
instead of file_get_contents()
but it requires you pull the contents using the server instead of allowing the client to do it.
There is no other trick / https
can only load https
/ http
can always load https
.