tag list
Home › Forums › WordPress Themes – Premium › Pure & Simple › tag list
- This topic has 3 replies, 8 voices, and was last updated 6 years, 2 months ago by
Binaya D.
-
AuthorPosts
-
February 27, 2016 at 6:29 pm #17111
Sandrine Brugot Maillard
ParticipantHello,
I would like to modify something just above the post in the “template-tags”.
I have that yet :* Prints HTML with meta information for the current post-date/time and author. */ function puresimple_posted_on() { $time_string = ''; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string .= ''; } $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() ) ); $posted_on = sprintf( _x( 'Publié le %s', 'post date', 'puresimple' ), '' . $time_string . '' ); $byline = sprintf( _x( 'par %s', 'post author', 'puresimple' ), '' . esc_html( get_the_author() ) . '' ); echo '' . $posted_on . ' ' . $byline . ''; //show category on blog page if(get_theme_mod('hide_category_on_blog_page') !== '' && is_home()){echo ' '.'' .__('Categorie :','puresimple').get_the_category_list(__( ', ', 'puresimple' )).'';} //show category on single post if(get_theme_mod('hide_category_on_single_post') !== '' && is_single()){echo ' '.'' .__('Categorie :','puresimple').get_the_category_list(__( ', ', 'puresimple' )).'';} if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) { echo ''; echo ''; _e( ' ', 'puresimple' ); comments_popup_link( __( 'commentaire', 'puresimple' ), __( '1 commentaire', 'puresimple' ), __( '% commentaires', 'puresimple' ) ); } echo ''; } endif;
and I would add the tag list (the same that in article-info)
I think I have to add that code but I’m not sure exactly where$tag_list = get_the_tag_list( '', __( ', ', 'puresimple' ) );
I would like it like that (going to line after the comments number) :
Publié le 18 avril 2010 par Sandrine Categorie :à lire 74 commentaires
Mots clés : auteurs belges, Bruxelles, Nicolas Ancion, Pocketcan you give me back the code above with this modification
Thank you, and excuse my english : I’m French !
February 29, 2016 at 7:08 am #22509Bidur
Moderatorhy Sandrine,
Here is the code with modification/** * Prints HTML with meta information for the current post-date/time and author. */ function puresimple_posted_on() { $time_string = '%2$s'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string .= '%4$s'; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date('j F Y') ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); $posted_on = sprintf( _x( 'Publié le %s', 'post date', 'puresimple' ), '' . $time_string . '' ); $byline = sprintf( _x( 'par %s', 'post author', 'puresimple' ), '' . esc_html( get_the_author() ) . '' ); echo '' . $posted_on . ' ' . $byline . ''; //show category on blog page if(get_theme_mod('hide_category_on_blog_page') !== '' && is_home()){echo ' '.'' .__('Categorie :','puresimple').get_the_category_list(__( ', ', 'puresimple' )).'';} //show category on single post if(get_theme_mod('hide_category_on_single_post') !== '' && is_single()){echo ' '.'' .__('Categorie :','puresimple').get_the_category_list(__( ', ', 'puresimple' )).'';} if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) { echo ''; echo ''; _e( ' ', 'puresimple' ); comments_popup_link( __( 'commentaire', 'puresimple' ), __( '1 commentaire', 'puresimple' ), __( '% commentaires', 'puresimple' ) ); } echo ''; echo ''; echo '
'; /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', esc_html__( ', ', 'puresimple' ) ); if ( $tags_list ) { printf( '' . esc_html__( 'Mots clés : %1$s', 'puresimple' ) . '', $tags_list ); // WPCS: XSS OK. } echo ''; } endif;hope this is heplfull for u
thanksFebruary 29, 2016 at 7:45 am #22512Sandrine Brugot Maillard
ParticipantIt works fine : thank you very much !
February 29, 2016 at 10:51 am #17112Binaya D
ParticipantHi Sandrine,
You are welcome 🙂 if you face any problem in further, then please let us know.
Thanks
-
AuthorPosts
- You must be logged in to reply to this topic.