• Resolved raizaduran

    (@raizaduran)


    On a single blog page, after by “author name” it shows Published “post date” updated “last updated date”.

    How can I remove this updated date section?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi raizaduran. Do you have Customize > Global Settings > Performance and SEO > Use Structured Data Markup option enabled?

    Thread Starter raizaduran

    (@raizaduran)

    Yes, I’ve unchecked it and it resolved the problem. But I don’t know if this would affect my site’s SEO and rating.

    What do you suggest?

    I don’t know if this would affect my site’s SEO and rating.

    That’s anyone’s guess. SEO is, in my opinion, a very subjective topic. If you want to keep the Structured Data Markup enabled, the other option is to copy the single.php theme file to a child theme and modify the output. Not difficult; you only need to change one line of code. If you want help with that let me know.

    Thread Starter raizaduran

    (@raizaduran)

    Yes, I’d love to do that change. Please let me know, how to do that.

    1. Create a /parts subdirectory in your child theme.
    2. Copy /parts/single-suthor-date.php from the parent theme to that same path in your child theme.
    3. Locate this section of code:

    <?php if( get_the_modified_date() != get_the_date() || get_the_modified_time() != get_the_time() ) : ?>
      <?php _e('Published', 'hueman'); ?> <time class="published" datetime="<?php the_time('Y-m-d H:i:s'); ?>"><?php the_time(get_option('date_format')); ?></time>
      <?php _e('Updated', 'hueman'); ?> <time class="updated" datetime="<?php the_modified_time('Y-m-d H:i:s'); ?>"><?php the_modified_time('F j, Y'); ?></time>
    <?php else : ?>

    Remove the “Updated” line so it looks like this:

    <?php if( get_the_modified_date() != get_the_date() || get_the_modified_time() != get_the_time() ) : ?>
      <?php _e('Published', 'hueman'); ?> <time class="published" datetime="<?php the_time('Y-m-d H:i:s'); ?>"><?php the_time(get_option('date_format')); ?></time>
    <?php else : ?>
    Thread Starter raizaduran

    (@raizaduran)

    Wow! This is so cool.

    Thanks a lot for the amazing help you do on every thread bdbrown.

    God bless you.

    Thank you and you’re welcome.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘how to remove "updated date" from a single blog’ is closed to new replies.