BuddyDev

Search

[Resolved] Embed external web page into WordPress Page or Post

  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #5113

    Hi, there

    Thanks for continuous replying and updating the solution. I’m really appreciated that.

    Now, I meet an issue about how to embed external web page into WordPress Page or Post.

    For example, I want to embed this link: https://code.org/starwars to one of Page or Post. What I want to achieve is that users can browse this page without leaving current page.

    I tried to use code <embed src=”xxx” width=”” height=””></embed>, however, it usually worked but not worked for this link.

    So, could you check that for me please? Thanks.

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #5116

    Hi Dandy,
    Browsers won’t allow that with this page.

    The problem is iframe inside iframe/embed is not allowed by browser security policies. That page contains an iframe leading to the problem.

    There is no solution to that unless the site is providing an iframe free version of pages.

    Hope that clarifies.

  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #5118

    Hi, Brajesh

    Thanks for your reply. Okay, I understand that.

    However, I’m wondering that is there any way to make it as a pop-up window?

    Thanks.

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #5123

    Hi Dandy,
    You can open a new popup window using window.open method as you may see here

    https://developer.mozilla.org/en-US/docs/Web/API/Window/open

    Hope that helps.

  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #5124

    Hi, Brajesh

    Thanks for your reply. Well, it’s okay to use that method. However, I just don’t know how can I add this method into a Page or Post of WordPress? Could you give me some code examples or approaches about that?

    Thank you very much.

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #5132

    Hi Dandy,
    You may put the following code in your post editor(in text mode)

    
    
    <a href="#" onclick="javascript:window.open('https://code.org/starwars', 'Title Here',    'resizable,scrollbars,status, height=500,width=500' ); return false;">Open</a>
    
    

    Hope that helps.

  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #5134

    Hi, Brajesh

    Thanks for your reply. If I want to implement this script: http://www.pontikis.net/tip/?id=20, where should I add it? functions.php or someplace else?

    Thanks and speak soon.

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #5143

    Hi Dandy,
    Apologies for the delayed reply.

    Please put that code in some javascipt file. Your theme may have a javascript file. If it is not, Then you can create one and load it on bp_enqueue_scripts action.

    Hope that helps.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #5150

    Hi, Brajesh

    It’s all right. I know you must be quite busy.

    Currently, I changed my direction and trying to implement Bootstrap Modal as popup windows to display external link. I installed a plugin called “Bootstrap Modals”. However, even I installed it, I still can’t figure out how can I add it in any Post or Page in WordPress.

    Could you give me some ideas about that or do you have any better ways to implement that?

    Thanks.

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #5151

    Hi Dandy,
    Thank you.

    The modal will not work for this case. It will still use an iframe for embedding and that will not work(iframe inside iframe issue). It is part of w3c specifications.

    If you want to use the modal for other purpose, They have the documentation here

    https://wordpress.org/plugins/bootstrap-modals/installation/

    Please do let me know if you need any further help.

The topic ‘ [Resolved] Embed external web page into WordPress Page or Post’ is closed to new replies.

This topic is: resolved