Title: Disable post date
Last modified: July 30, 2026

---

# Disable post date

 *  [Caitriona](https://wordpress.org/support/users/caitriona1/)
 * (@caitriona1)
 * [1 week, 3 days ago](https://wordpress.org/support/topic/disable-post-date/)
 * Hi, I use the Pinnacle theme. I have disabled the visible post date, but Pinnacle
   still outputs this publication date in the page source.
 * Google is selecting this old date in search results. Is there a Pinnacle PHP 
   hook or filter that will prevent this element from being generated on individual
   posts?
 * I need to remove only this theme-generated date from the rendered HTML. I still
   want `datePublished` retained in Article JSON-LD schema, and I do not want to
   hide it with CSS.

Viewing 1 replies (of 1 total)

 *  [Eze](https://wordpress.org/support/users/chieze/)
 * (@chieze)
 * [1 week, 2 days ago](https://wordpress.org/support/topic/disable-post-date/#post-18980086)
 * Hi [@caitriona1](https://wordpress.org/support/users/caitriona1/),
 * Happy to help.
 * There’s no built-in Pinnacle filter to prevent this _datePublished_ element from
   being generated on individual posts.
 * As a workaround, if you are using a child theme, you can create _templates/entry-
   meta-subhead.php_ in your child theme with this content, which deletes the date
   span:
 *     ```wp-block-code
       <div class="subhead">    <span class="postauthortop author vcard">        <?php echo __('by', 'pinnacle'); ?> <span itemprop="author"><a href="<?php echo esc_attr(get_author_posts_url(get_the_author_meta('ID'))); ?>" class="fn" rel="author"><?php echo get_the_author() ?></a></span>    </span>    <span class="postcommentscount"><?php echo __('with', 'pinnacle'); ?>         <a href="<?php the_permalink();?>#post_comments"><?php comments_number(); ?></a>    </span></div>
       ```
   
 * If you’re using a code snippets plugin instead, you can use this snippet to strips
   out the date span:
 *     ```wp-block-code
       add_action( 'template_redirect', function() {    if ( is_singular( 'post' ) ) {        ob_start( function( $html ) {            return preg_replace(                '/<span class="updated postdate">.*?itemprop="datePublished".*?<\/span>\s*<\/span>/s',                '',                $html            );        } );    }} );
       ```
   
 * I hope this helps.

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdisable-post-date%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/kadence/1.5.2/screenshot.png)
 * Kadence
 * [Support Threads](https://wordpress.org/support/theme/kadence/)
 * [Active Topics](https://wordpress.org/support/theme/kadence/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/kadence/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/kadence/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Eze](https://wordpress.org/support/users/chieze/)
 * Last activity: [1 week, 2 days ago](https://wordpress.org/support/topic/disable-post-date/#post-18980086)
 * Status: not resolved