[Resolved] tooltip over post date shows time ???

Home Forums Support tooltip over post date shows time ???

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #316235
    dasigna

    just stumbled upon this: when hovering over a post date the tooltip shows the time.
    settings are to only show the date – no more.

    somehow this makes absolutely no sense. is there a simple way to change it?
    e.g. showing the date in in tooltip or showing nothing at all?

    thanks.

    #316337
    Tom
    Lead Developer
    Lead Developer

    You can use filters to change the output:

    add_filter( 'generate_post_date_output', 'tu_date_remove_time_tooltip' );
    function tu_date_remove_time_tooltip() {
    	$time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time>';
    	if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
    		$time_string .= '<time class="updated" datetime="%3$s" itemprop="dateModified">%4$s</time>';
    	}
    
    	$time_string = sprintf( $time_string,
    		esc_attr( get_the_date( 'c' ) ),
    		esc_html( get_the_date() ),
    		esc_attr( get_the_modified_date( 'c' ) ),
    		esc_html( get_the_modified_date() )
    	);
    	
    	// If our date is enabled, show it
    	printf( '<span class="posted-on">%1$s</span>',
    		sprintf( '<a href="%1$s" rel="bookmark">%2$s</a>',
    			esc_url( get_permalink() ),
    			$time_string
    		)
    	);
    }
    #316431
    dasigna

    hi tom,

    just pasted your code as it is and its showing nothing… on blog archive and single blog. task kompleted (if that is was your code exactly intended). thanks!

    but i have one post on elementor-buildt page within a wp-show-posts widget – and here the time is still showing as tooltip.
    strange or as it is supposed to be???

    #316542
    Tom
    Lead Developer
    Lead Developer

    WP Show Posts has different filters.

    They’re available in the current beta version if you’d like. If so, shoot me an email: https://wpshowposts.com/contact/

    #316645
    dasigna

    hmmm …

    any timeline for next WPSP official release? if not too far i might wait.

    #316776
    Tom
    Lead Developer
    Lead Developer

    It’s a tough update. Things were basically re-written so the old free plugin won’t work with the new premium and the other way around. Need to figure out a way to maintain compatibility as much as possible.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.