WordPress.org

Ready to get started?Download WordPress

Forums

Pinboard
Date stamp for static page - blog excerpt (2 posts)

  1. pptouring
    Member
    Posted 1 year ago #

    I would like to have the date present for the page excerpts that are on my static page. It seems the only way to get the date stamp is by selecting "Aside" under format, but then my page title disappears.

    Here is my demo page where you can see what I am trying to explain. Notice the small blog excerpt on the left hand side is the only one with the date and no title.

    http://demo.pedalpowertouring.com/

    thank you for your assistance.

    pptouring

  2. pptouring
    Member
    Posted 1 year ago #

    Ok I've been poking around with the functions.php and made the following changes.

    /** This is where you can change to format to accept dates **/
    function pinboard_excerpt_permalink( $excerpt ) {
    if( pinboard_is_teaser() && ( ! has_post_format( 'aside' ) || ! has_post_format( 'status' ) || ! has_post_format ('gallery') || ! has_post_format('image') || ! has_post_format('link') || ! has_post_format('quote') || ! has_post_format('video') || ! has_post_format('audio')) )
    $excerpt = str_replace( '</p>', ' → ' . get_the_time( get_option( 'date_format' ) ) . '</p>', $excerpt );
    return $excerpt;
    }
    endif;

    I'm not sure if this is the best way to add the date to each "teaser" or excerpt, but it seems to work.

    Any suggestions to make this better?

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.