[Resolved] Dumbass here – space disappeared "Updated: June 20, 2019by Clare"

Home Forums Support Dumbass here – space disappeared "Updated: June 20, 2019by Clare"

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #936254
    Clare

    Hey guys,

    i’ve been rooting around CSS or snippets and trying to figure out why my updated date has started to appear as above, with no space between ‘2019’ and ‘by’. I’m sure this is something dumb I haven’t figured out, it only started today it seems.

    Thank you in advance for any help and apologies if I’m really being dumb πŸ™‚

    I’m using this snippet:

    add_filter( 'generate_post_date_output', function() {
        $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() )
        );
    
        return sprintf( '<span class="posted-on">%1$s</span>', // WPCS: XSS ok, sanitization ok.
            sprintf( '<a href="%1$s" title="%2$s" rel="bookmark">%3$s</a>',
                esc_url( get_permalink() ),
                esc_attr( get_the_time() ),
                $time_string
            )
        );
    } ); 

    and this CSS:
    .posted-on .updated {
    display: inline-block;
    }

    .posted-on .updated:before {
    content: “Updated: “;
    }
    time.entry-date.published {
    display: none;
    }

    #936266
    Leo
    Staff
    Customer Support

    Hi there,

    Not dumb at all πŸ™‚ This is due to the latest theme update I believe.

    Try adding this CSS:

    span.posted-on {
        padding-right: 3px;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Let me know πŸ™‚

    #936344
    Clare

    YAY!! Easy when you know how πŸ™‚ thank you so much for the quick reply.. Really appreciate it.
    Clare

    #936357
    Leo
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.