If the post title is blank display absolutely nothing
-
Hi, I’d like it so that if a post has a title
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
is displayed like normal. However, if the post does not have a title I’d like absolutely nothing displayed.
Currently if the post title is blank
<h2><a href="https://url.com" rel="bookmark" title="Permanent Link to "></a></h2>
shows up in the html. I’d prefer absolutely nothing to show up in the html if a post has no title.
I’m sure this is simple and can be done I’m just not sure how.
Thanks,
A
- The topic ‘If the post title is blank display absolutely nothing’ is closed to new replies.