web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Power Virtual Agents o...
Copilot Studio
Answered

Power Virtual Agents on Wordpress site - On Webpage vs Floating

(0) ShareShare
ReportReport
Posted on by 152

Hi,

 

I am able to embed a Microsoft Power Virtual Agent on my wordpress site.  

The Bot is now on a webpage.  I am wondering if it is possible to make the bot float on top (like this below screen capture) rather than on a webpage like I have now.  

 

dchan1_0-1694797911802.png

 

 

Thanks.

 

Dchan

Categories:
  • Verified answer
    fernandosilva Profile Picture
    Super User 2024 Season 1 on at

    Hi @dchan1 ,

     

    To achieve what you want, there are 2 ways you can do it.

     

    The first way to is to to embed the iframe inside a div in the footer.php file.

    The div the iframe is in needs to have the z-index higher than the pages. You can set the z-index: 1 and see how it goes. if the bot doesn't appear, try to change to a higher z-index.

     

    The second way is to inject a script dynamically into a div.

    If you are using the custom html canvas, you can play around on how to insert the chatbot into the page.

    First create a div in the footer.php and then in a script file, place the following code:

     

     /*chatbot window*/
     function chatbotin() {
     var cwindowin = document.getElementById("chatwindow");
     cwindowin.style.display = "block";
    
     var ifrm = document.createElement("iframe");
     ifrm.setAttribute("src", "place here the url of the html file that points to your html custom canvas");
     ifrm.setAttribute("id", "ichat");
     ifrm.setAttribute("frameborder", "0");
     ifrm.style.width = "100%";
     ifrm.style.height = "100%";
     ifrm.style.borderRadius = "15px";
     cwindowin.appendChild(ifrm);
    
     var chaticon = document.getElementById("chaticon");
     chaticon.style.display = "none";
     }
     

     

    Please make sure to add your css accordingly as well.

     

    I hope it helps.

     

    Cheers,

     

    Fernando

     

  • dc7669 Profile Picture
    152 on at

    Hi Fernado,

     

    I followed your instructions.  And with some additional help from w3school on Pop Up Chat Windows.

    I am able to put make the Chat Windows from Power Virtual Agent to flow on the bottom right corner of the webpage!  

    I used the first method!  

     

    THANKS! 

     

    dchan1

  • fernandosilva Profile Picture
    Super User 2024 Season 1 on at

    Hi @dchan1 ,

     

    Glad it is working.

     

    Cheers,


    Fernando

  • acumor Profile Picture
    4 on at

    hi, can you provide more details how to do this, as i'm not a savvy programmer...

  • dc7669 Profile Picture
    152 on at

    Hi acumor,

    In my Wordpress Site, under Appearance, Customize, Additional CSS, I added below, 


    /* The popup chat - hidden by default */
    .chat-popup {
    background-color: #FFFFFF;
    position: fixed;
    bottom: 0;
    right: 15px;
    border: 3px solid #f1f1f1;
    z-index: 9999;
    }

    (This is the part about z-index)

     

    In footer.php (Appearance, Theme File Editor, Footer.php), I added the below:

    <div class="chat-popup" id="myForm">
    <iframe src="url to the chatbot" frameborder="0" style="width: 100%; height: 500px;"></iframe>

    (This is the part about embed iframe in footer.php.)

     

    Done.  

     

    dchan1

  • acumor Profile Picture
    4 on at

    awesome, great job, thank you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Copilot Studio

#1
11manish Profile Picture

11manish 121 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 102

#3
anirudhev Profile Picture

anirudhev 65

Last 30 days Overall leaderboard