Hello I am new to Wordpress, I've got a button which is Quick Enquiry which is placed at the bottom of my post. I want to open an iframe on that button's click.
I tried a plugin named iframe popup,
function forIframe()
{[iframe-popup category="Category1"];}
<button style="background-color: #232254; text-decoration: none; color: #ffffff; width: 200px; height: 50px; border-radius: 15px 15px 15px;" onclick="forIframe();">Quick Enquiry</button>
Hello I am new to Wordpress, I've got a button which is Quick Enquiry which is placed at the bottom of my post. I want to open an iframe on that button's click.
I tried a plugin named iframe popup,
function forIframe()
{[iframe-popup category="Category1"];}
<button style="background-color: #232254; text-decoration: none; color: #ffffff; width: 200px; height: 50px; border-radius: 15px 15px 15px;" onclick="forIframe();">Quick Enquiry</button>
But nothing is working.
https://www.ithink.co/support-ticketing-system.html
Please visit this link, you will see a quick enquiry button. I want it exactly the same. Thank you.
Share Improve this question edited Feb 19 at 21:46 LWC 1,2131 gold badge14 silver badges34 bronze badges asked Jun 19, 2017 at 5:33 InternIntern 512 silver badges4 bronze badges 8- its working fine here – R.K.Bhardwaj Commented Jun 19, 2017 at 5:42
- The given link is an example which I want to recreate in my wordpress post. - @RajKumarBhardwaj – Intern Commented Jun 19, 2017 at 6:01
- are you use bootstrap? – Shital Marakana Commented Jun 19, 2017 at 6:58
- I don't think that's an iframe, but a modal. Try using a modal plugin for wordpress such as this one wordpress/plugins/popup-maker EDIT: It is an iframe, but you can achieve this with a modal – Spliid Commented Jun 19, 2017 at 7:00
- iframe popup plugin only allows you to load an iframe in a modal box after x seconds. You cannot set it to activate upon a click event unfortunately. – josephting Commented Jun 19, 2017 at 7:11
1 Answer
Reset to default 4you can create popup by using bootstrap in wordpress
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn./bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare./ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn./bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Modal Example</h2>
<!-- Trigger the modal with a button -->
<button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Quick Enquiry</button>
<!-- Modal -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Quick Enquiry</h4>
</div>
<div class="modal-body">
<p>[iframe-popup category="Category1"]</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</body>
</html>