-
Author
-
October 28, 2014 at 20:10 #33356dorisarnaudParticipant
Hello
How can I remove date, author and number of comment infos on posts pageThank you
Attachments:
You must be logged in to view attached files.October 29, 2014 at 17:46 #33457sharmstrModeratorThere’s a few ways you can do it, but maybe the easiest is to just add a conditional statement in the kleo_entry_meta function that will check to see if its on a post page. If so, then display it.
I havent tested this, but try it in your functions.php file.
COPY CODEfunction kleo_entry_meta($echo=true, $att=array()) { if (is_single()) : $meta_list = array(); // Translators: used between list items, there is a space after the comma. $categories_list = get_the_category_list( __( ', ', 'kleo_framework' ) ); // Translators: used between list items, there is a space after the comma. $tag_list = get_the_tag_list( '', __( ', ', 'kleo_framework' ) ); $date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a>', esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); $author = sprintf( '<a href="%1$s" title="%2$s" rel="author">%3$s</a>', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'kleo_framework' ), get_the_author() ) ), get_the_author() ); $meta_list[] = '<small class="meta-author">'.$author.'</small>'; $meta_list[] = '<small>'.$date.'</small>'; $cat_tag = array(); if ( $categories_list ) { $cat_tag[] = $categories_list; } if ($tag_list) { $cat_tag[] = $tag_list; } if (!empty($cat_tag)) { $meta_list[] = '<small class="meta-category">'.implode(", ",$cat_tag).'</small>'; } //comments if (!isset($att['comments']) || (isset($att['comments']) && $att['comments'] !== false)) { $meta_list[] = '<small class="meta-comment-count"><a href="'. get_permalink().'#comments">'.get_comments_number().' <i class="icon-chat-1 hover-tip" data-original-title="'.sprintf( _n( 'This article has one comment', 'This article has %1$s comments', get_comments_number(), 'kleo_framework' ),number_format_i18n( get_comments_number() ) ).'" data-toggle="tooltip" data-placement="top"></i></a></small>'; } if ($echo) { echo implode(", ", $meta_list); } else { return implode(", ", $meta_list); } endif; }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
October 29, 2014 at 18:13 #33467dorisarnaudParticipantThank you
I have to copy this in Kleo or Kleo child?
October 29, 2014 at 18:23 #33472sharmstrModeratorYou should have kleo child enabled. Then put it in kleo-child/functions.php
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
October 29, 2014 at 18:30 #33474dorisarnaudParticipantI was wrong I copied it in Kleo and now I no longer have access to my site.
What should I do? I do not have access to anythingOctober 29, 2014 at 18:59 #33481dorisarnaudParticipantYour code doesn’t work. I’ve copied in kleo child and meta infos are there again.
October 29, 2014 at 19:07 #33482sharmstrModeratorI just tested it and it works. It removes the meta info from blog list, but not from the actual post.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
Attachments:
You must be logged in to view attached files.October 29, 2014 at 19:15 #33485dorisarnaudParticipantCan you check the url http://www.escapadedeluxe.com/type_aventure/croisiere-privee/
to understand that I would like remove : Infos to remove : Doris A., 28 octobre 2014, 0Thank you
October 29, 2014 at 19:45 #33488sharmstrModeratorThe code I gave you will do that. Did you see my screenshot?
If you put my code in /kleo-child/functions.php and have Kleo Child enabled, it will work. It will even remove it when you’re using the post grid shortcode. The only place it wont remove it from this the actual post page.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
October 29, 2014 at 20:00 #33490dorisarnaudParticipantI was designed my website with kleo theme and not kleo child theme …
Is it wrong?How can I do to transfer all the work I’ve already done to child theme?
But I also need to remove meta info on the post page.
What is the best solution?
Thank you
October 29, 2014 at 20:25 #33493sharmstrModeratorYou should be using the kleo child theme. To copy all of the changes from Kleo to Kleo Child see this post https://archived.seventhqueen.com/forums/topic/newbie-mess-up-manipulating-parent-theme#post-30484
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
October 29, 2014 at 20:29 #33494dorisarnaudParticipantOk thank you
You have not answered my question
I also need to remove meta info on the post page. How can I do ?October 29, 2014 at 21:48 #33510sharmstrModeratorThen just turn if off completely. WP Admin -> Theme Options -> Blog -> Display Post Meta. I wish you would have stated that early on.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
October 30, 2014 at 00:37 #33534sharmstrModeratorPlease mark resolved.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The topic ‘Remove meta info’ is closed to new replies.