forked from LiveCarta/LiveCartaWP
37 lines
743 B
PHP
37 lines
743 B
PHP
<?php
|
|
/**
|
|
* Template Name: Resource Item
|
|
*/
|
|
|
|
get_header();
|
|
|
|
if (have_posts()):
|
|
while (have_posts()):
|
|
the_post();
|
|
?>
|
|
<div class="content">
|
|
<?= the_content(); ?>
|
|
|
|
<script>
|
|
document.addEventListener("DOMContentLoaded", (event) => {
|
|
document.addEventListener( 'wpcf7submit', ( event ) => {
|
|
console.log("submit");
|
|
},false);
|
|
|
|
document.addEventListener( 'wpcf7mailsent', ( event ) => {
|
|
if (!pdfUrl) {
|
|
console.warn("please add pdfUrl");
|
|
return;
|
|
}
|
|
window.open(pdfUrl, "_self");
|
|
}, false );
|
|
});
|
|
</script>
|
|
</div>
|
|
|
|
<?php
|
|
endwhile;
|
|
endif;
|
|
|
|
get_footer();
|