Just checking on whether we can get the search results a little cleaner… When a main page (for instance, “About”) appears in the search results, could the metadata about its publishing date be left off? Similarly, when an event page (created with the Events Calendar Pro as recommended) appears in the search results, could the metadata show its event date instead of the entry’s publish date? (It just seems like the publish date should only show for article posts.)
Hi kristenangel!
Add this to your custom CSS.
.search .post-meta-infos time, .search .post-meta-infos .text-sep {
display: none;
}
As for changing the events date open up /includes/loop-search.php and on line 40 you should see this.
<?php the_time('d M Y'); ?>
Change it to this.
<?php if ( tribe_is_event() ) { echo tribe_get_start_date ( null, true, '' ); } else { the_time('d M Y'); } ?>
Cheers!
Elliott
Thanks, Elliott. For the first point – hiding the timestamp on results – we are actually looking to hide the timestamp only on Pages, but still have them display for Posts. So my blog entry will be dated, but the publish date on a page like “About” won’t show the meta. Is this possible?
Hi!
Use this instead then.
.page time { display: none !important; }
Regards,
Elliott
Perfect. Thank you!
— UPDATE Jan 7, 2015 – Just noticing that this css fixed the issue on the search results page, but removed the timestamp on every other page using the Blog Posts tool. How do I apply this code to the search results page only? Tried the following with no luck:
.template-search .page time { display: none !important; }