• earnandsave

    (@earnandsave)


    I know this has been asked before, and I ‘ve found some helpful information. I created a custom field called ‘hide_title’, and this code in my template file:

    <?php if (get_post_meta($post->ID, "hide_title", true))
    { ?>
      <h1 class="postitle">
          <?php the_title(); ?>
      </h1>
    <?php }
    ?>

    so if I set the ‘hide_title’ field to ‘true’, it should ignore the code that displays the title, right? But it doesn’t work, the title always shows. What am I missing? please help!

  • The topic ‘Custom field to hide title’ is closed to new replies.