how to embed external webpage in my wordpress page

You could simply iframe the content into your pages?

<iframe src="http://www.w3schools.com"></iframe> 

Some more info on iframe params are here: http://www.w3schools.com/tags/tag_iframe.asp

Otherwise a nicer alternative might be to show the external pages via a modal window (which is still essentially an iframe).

You could try Fancybox (http://fancyapps.com/fancybox/#examples), there are iframe examples and code on the page, but it’s quite simple, once you’ve included the relevant files you just use

<a class="various" data-fancybox-type="iframe" href="https://wordpress.stackexchange.com/demo/iframe.html">Iframe</a>

Then the JS would look like:

$(document).ready(function() {
$(".various").fancybox({
    maxWidth    : 800,
    maxHeight   : 600,
    fitToView   : false,
    width       : '70%',
    height      : '70%',
    autoSize    : false,
    closeClick  : false,
    openEffect  : 'none',
    closeEffect : 'none'
});

});

Leave a Comment