I have this snippet in a "portfolio-loop.php" file. I'm using get_template_part to display the loop on the front page and on other pages.
I have this within the loop:
<?php if( !is_home() || !is_front_page() ) { ?>
<p><?php the_time('F Y'); ?></p>
<?php endif } ?>
I can't seem to get it to exclude the front page. Could it because it's in it's own template?
edit
Ok I fixed some of my semantic errors thanks to s_ha_dum and Tom Nowell. I've tried the following variations:
<?php if ( !is_home() && !is_front_page() ) { ?>
<!--nada -->
<?php } else { ?>
<p><?php the_time('F j, Y'); ?></p>
<?php } ?>
//dropping is_home() and trying to keep it as simple as possible
<?php if(!is_front_page()) { ?>
<p><?php the_time('F j, Y'); ?></p>
<?php } ?>
I still can't hide the time on the front page. At best '<--nada-->' will appear on both my home page (home.php) and on my archive (category-blog.php). Is my custom category page seen as a front page as well?
edit 2
What I'm trying to do in plain english:
I have a loop on my front page (static, home.php) displaying three of my latest blog posts via get_template_part. The same loop is used for my category-blog.php/archive listing but shows the last 10 posts. I do not want to show the date/time on the front page to keep the layout cleaner, only on the other pages that this loop is displayed on.