I’m trying to output different text depending on the custom post type and I’m getting a syntax error which I believe is due to multiple if-statements. The problem is that I have a very limited knowledge of PHP. Any ideas?
<?php
if ( 'lettering' == get_post_type() ) {
<?php if( function_exists( 'attachments_get_attachments' ) ) {
$attachments = attachments_get_attachments();
$total_attachments = count( $attachments );
if( $total_attachments ) : ?>
<ul id="process"><span>Process:</span>
</ul>
<br>
<?php endif; ?> <?php } ?>
} elseif ( 'type' == get_post_type() ) {
<?php if( function_exists( 'attachments_get_attachments' ) ) {
$attachments = attachments_get_attachments();
$total_attachments = count( $attachments );
if( $total_attachments ) : ?>
<ul id="process"><span>Additional Shots</span>
</ul>
<br>
<?php endif; ?> <?php } ?>
}
?>
remove opening php tags like:
change:
to
and similarly in
elseifAdded: