<!-- function.php -->
// Magnific Popup - Inline Content Enabler
function inline_popup_enabler(){
?>
<script>
(function($){
$(window).load(function() {
$('.inline_popup').magnificPopup({
type:'inline',
midClick: true
});
});
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'inline_popup_enabler');
<!-- In the Page -->
<!-- Button Code -->
<div class="popup-button">
<a href="#" data-mfp-src="#popup_content" class="inline_popup ">
<span class="link-title">Read More</span>
</a>
</div>
<!-- POPUP Content -->
<div id="popup_content" class="white-popup mfp-hide popup-content">
<div class="popup-inner">
#########
</div>
</div>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter