Disable Post Title

I am using Integrity and would like to know if there is a way to disable POST title. I know there is a an option to disable PAGE title. Is there something similar for posts? Unfortunately, I am forced to leave title blank on some posts…

Please help.

Hello There,

Thanks for writing in! Regretfully there is no option to remove the post titles. It can only be done by custom code. I am not sure which stack you are using so I cannot give you the exact details. You may follow the instruction below and replace the stack accordingly.

Once you have your child theme active and ready, please follow the following steps below:
1] Please login to your ftp and copy the file wp-content/themes/x/framework/views/{your-stack}/_content-post-header.php
2] You will have to edit it and remove the post title. Take the code from integrity as an example:

<?php

// =============================================================================
// VIEWS/INTEGRITY/_CONTENT-POST-HEADER.PHP
// -----------------------------------------------------------------------------
// Standard <header> output for various posts.
// =============================================================================

?>

<header class="entry-header">
  <?php if ( is_single() ) : ?>
     <!-- do nothing -->
  <?php else : ?>
  <h2 class="entry-title">
    <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php x_the_alternate_title(); ?></a>
  </h2>
  <?php endif; ?>
  <?php x_integrity_entry_meta(); ?>
</header>

3] Save the file and upload this file to your server in the child theme’s folder wp-content/themes/x-child/framework/views/{your-stack}/_content-post-header.php

Hope this helps. Please let us know how it goes.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.