ben-g
7/24/2017 - 2:22 PM

Php checking parent id of pages

Php checking parent id of pages

<!-- this function checks to see if a page is the child of the parent specified.  In this case, if 
it is NOT a child of the parent, then it loads the form code.  To load the form if it IS a
parent child, then simply remove the exclamation point.  -->

<?php global $post; ?>
			<?php if (!$post->post_parent == 61) { ?>
          <div class="form-bg"></div>
          <div id="form">
            <a href="#" class="close">&times;</a>
            <h2 class="h3">Request My Info Packet</h2>
            <script src="form request link"></script>
          </div>
			<?php } ?>