Tagged: x
-
AuthorPosts
-
May 14, 2016 at 8:46 pm #991772
friedcircuitsParticipantIf I enable the show meta data on the front page how do you change it to show last updated instead of created date?
Here is the site
Thanks.
May 15, 2016 at 1:49 am #991918
ChristopherModeratorHi there,
Please add following code in child theme’s functions.php file :
// Entry Meta // ============================================================================= if ( ! function_exists( 'x_integrity_entry_meta' ) ) : function x_integrity_entry_meta() { // // Author. // $author = sprintf( '<span><i class="x-icon-pencil" data-x-icon=""></i> %s</span>', get_the_author() ); // // Date. // $date = sprintf( '<span><time class="entry-date" datetime="%1$s"><i class="x-icon-calendar" data-x-icon=""></i> %2$s</time></span>', esc_attr( get_the_modified_time( 'F j, Y' ) ), esc_html( get_the_modified_time('F j, Y') ) ); // // Categories. // if ( get_post_type() == 'x-portfolio' ) { if ( has_term( '', 'portfolio-category', NULL ) ) { $categories = get_the_terms( get_the_ID(), 'portfolio-category' ); $separator = ', '; $categories_output = ''; foreach ( $categories as $category ) { $categories_output .= '<a href="' . get_term_link( $category->slug, 'portfolio-category' ) . '" title="' . esc_attr( sprintf( __( "View all posts in: “%s”", '__x__' ), $category->name ) ) . '"><i class="x-icon-bookmark" data-x-icon=""></i> ' . $category->name . '</a>' . $separator; } $categories_list = sprintf( '<span>%s</span>', trim( $categories_output, $separator ) ); } else { $categories_list = ''; } } else { $categories = get_the_category(); $separator = ', '; $categories_output = ''; foreach ( $categories as $category ) { $categories_output .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in: “%s”", '__x__' ), $category->name ) ) . '"><i class="x-icon-bookmark" data-x-icon=""></i> ' . $category->name . '</a>' . $separator; } $categories_list = sprintf( '<span>%s</span>', trim( $categories_output, $separator ) ); } // // Comments link. // if ( comments_open() ) { $title = apply_filters( 'x_entry_meta_comments_title', get_the_title() ); $link = apply_filters( 'x_entry_meta_comments_link', get_comments_link() ); $number = apply_filters( 'x_entry_meta_comments_number', get_comments_number() ); if ( $number == 0 ) { $text = __( 'Leave a Comment' , '__x__' ); } else if ( $number == 1 ) { $text = $number . ' ' . __( 'Comment' , '__x__' ); } else { $text = $number . ' ' . __( 'Comments' , '__x__' ); } $comments = sprintf( '<span><a href="%1$s" title="%2$s" class="meta-comments"><i class="x-icon-comments" data-x-icon=""></i> %3$s</a></span>', esc_url( $link ), esc_attr( sprintf( __( 'Leave a comment on: “%s”', '__x__' ), $title ) ), $text ); } else { $comments = ''; } // // Output. // if ( x_does_not_need_entry_meta() ) { return; } else { printf( '<p class="p-meta">%1$s%2$s%3$s%4$s</p>', $author, $date, $categories_list, $comments ); } } endif;Hope it helps.
May 15, 2016 at 2:37 am #991956
friedcircuitsParticipantAwesome, worked well. Thank you for the quick response.
May 15, 2016 at 2:38 am #991957
friedcircuitsParticipantI take it it would be just remove the respective parts to remove author so it only shows the date and categories? Maybe I can change the author to say Updated: before the date?
May 15, 2016 at 3:28 am #992000
Nabeel AModeratorHi again.
Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.
July 22, 2016 at 12:17 am #1098226
friedcircuitsParticipantThanks. I actually changed the Author to just say updated in front of the date.
July 22, 2016 at 12:51 am #1098249
RupokMemberYou are welcome!
Feel free to let us know if you face any other issue. We’ll be happy to assist you.
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-991772 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
