I’m trying to get a specific link to show in a
php partial if it’s on a
I have the code in a
top-part.php which I’m including on the
<?php if (is_singular( 'things' )) : ?> //Show content if it's on single-things.php post type <?php else : ?> //Display other content <?php endif; ?>
Main thing is that I have the
top-part.php included on other pages as a partial so I only want to show that specific content if it’s on the URL of the single item in the custom post type.
That should be working, right? Unless I’m missing something.
Read more here: Display specific content on singular custom post type