• Resolved Joe

    (@sabbathbreaker)


    Hi,

    If I has removed the post date via css, will it be indexed in google results? Thanks in advance

Viewing 13 replies - 1 through 13 (of 13 total)
  • hannah

    (@hannahritner)

    Hey,
    No, that should not affect it. By removing with css you are simply hiding it.

    Hannah

    Thread Starter Joe

    (@sabbathbreaker)

    Hi Hannah,

    Is that mean when I hiding the post date, the search result still showing the date stamp? if so, how to hide the date in the search results when using post but the result is similar to using page? I just want to remove the date for all the post in the same category, let say “category-articles”. Thanks

    hannah

    (@hannahritner)

    So with css you can remove the date by page, not necessarily by category. Does that make sense? So if you post a link to your category-articles page I can provide the css to remove the date from the posts on that page. But unless removed they would still display in the individual post pages.

    Hannah

    Thread Starter Joe

    (@sabbathbreaker)

    Hi Hannah,

    I have hide my category-snoring posts date using css, you can check my snoring mouthpiece site, the snoring facts category does not display any date.

    If this a correct way to remove the date in the post so it will not displayed in the results? Do i need to removed post meta data as well? Thanks

    Thread Starter Joe

    (@sabbathbreaker)

    Hi Hanah,

    I have hide the category-snoring posts date using css, please check my snoring mouthpiece website, all the articles in the snoring facts category does not display any date as intended.

    Is this the right way to remove the date in the posts so it will not displayed in the search results? Do I need to removed the post meta data as well? Thanks

    Hey,
    So in general if you don’t want something to be date oriented you should use a page not a post.
    By hiding the post date search won’t show the date in the search results but it’s still considered a post and so still considered more time sensitive then a page. Your best option is just to use pages.

    Kadence Themes

    Thread Starter Joe

    (@sabbathbreaker)

    Hi,

    In this way, how to completely remove the date from the structural data of post? Thanks

    hentry date and BlogPosting datePublished

    I don’t suggest you do that. But if you don’y want to use page then you would have to use a child theme and edit the post output for single and loops in the templates of the theme.

    Kadence Themes

    Thread Starter Joe

    (@sabbathbreaker)

    Hi,

    Thanks for your suggestion, but I could not find the file. May I know which file in the templates and the line number to edit?

    Please understand that I think this is such a bad idea I almost want to help you by not telling you how to do this. but you are the site owner so please do what you want.
    In your child theme you would copy all the files below into a templates folder on your site.

    virtue/templates/content-single.php (line 28)
    virtue/templates/content-fullpost.php (line 15)
    virtue/templates/content-fullpostfull.php (line 16)
    virtue/templates/content-fullwidth.php (line 1)
    virtue/templates/content.php (line 1)
    virtue/templates/entry-meta-subhead.php (line 3 for itemprop=”author”)
    virtue/templates/entry-meta.php (line 1)
    virtue/templates/post-date.php (line 2)
    virtue/templates/recentblog-carousel.php (line 41)
    virtue/templates/similarblog-carousel.php (line 47)

    Kadence Themes

    Thread Starter Joe

    (@sabbathbreaker)

    Hi,

    Thanks for your advise, it seems not a good idea to change so many files, don’t worry I will not proceed. As I just wanted to remove the date of certain post category ie snoring.

    And I have tested the below method may works although with error status of missing date when checking with structural markup tool. I have edited the post-date.php. I would like to hear your suggestion on this, thanks

    <div class="postmeta updated">
          <div class="postdate bg-lightgray headerfont" itemprop="datePublished">
          <?php if ( in_category('snoring') ) : ?>
          <?php else: ?>
    	<span class="postday"><?php echo get_the_date('j'); ?></span>
    	<?php echo get_the_date('M Y');?>
         <?php endif; ?>
        </div>
    </div>

    I think thats fine just make sure you do your edits through a child theme.

    Kadence Themes

    Thread Starter Joe

    (@sabbathbreaker)

    Thanks for your support, hope that you can add such feature in your theme in the future. In my opinion, it makes the contents looks evergreen in the search results without any time stamp attached when using post.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘If removed the post date and search result’ is closed to new replies.