I'm making a custom theme from scratch for a customer and he wants it so on the front page, it hides the gallery if there's a post-thumbnail and on a sub-page, reversed. So here's my question:
I want to make it so it, on a specific page, checks if the post(s) has a post-thumbnail AND gallery and if it does, hide the gallery and only output the post-thumbnail. How would I do that? Here's my current post setup:
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <h2><?php the_title(); ?></h2> <p class="post-image"><?php the_post_thumbnail( array(400,400)); ?></p> <p class="post-gallery"> <?php the_content(); ?> </div>
I'm new to asking questions about coding on forums so sorry if I'm not being specific enough.