Tagged: x
-
AuthorPosts
-
August 22, 2016 at 3:55 pm #1142091
mach0boiParticipantHi. I can’t seem to figure out how to remove the CATEGORY in the meta post description. I want to include the author, the date, and remove the comments and category/tags.
Also, is there a way to include the page view count in the meta? If so, I want to know how.
My URL is http://www.thelazylifter.com – using ETHOS with Child theme
August 22, 2016 at 3:56 pm #1142097
mach0boiParticipantIn addition, how can I remove the arrow from each post that links to the previous article?
Thank you!
August 22, 2016 at 7:49 pm #1142407
mach0boiParticipantAnyone?
August 22, 2016 at 10:10 pm #1142520
Prasant RaiModeratorHello There,
Thanks for writing in!
You can add this under Custom > CSS in the Customizer:
p.p-meta span:nth-child(1) {display:none !important} p.p-meta span:nth-child(3) {display:none !important} .x-nav-articles { display: none !important; }Please walk-through following thread to implement post count:
https://community.theme.co/forums/topic/display-post-view-count-with-icon-in-meta/
Thanks.
August 22, 2016 at 10:51 pm #1142554
mach0boiParticipantHi! Thanks for the reply.
The arrow’s gone and the category in the meta, but the author name too.
I want the author name and the date to remain.
August 23, 2016 at 5:07 am #1142832
ChristianModeratorPlease add the code below in your functions.php
function x_ethos_entry_meta() { // // Author. // $author = sprintf( ' %1$s %2$s</span>', __( 'by', '__x__' ), get_the_author() ); // // Date. // $date = sprintf( '<span><time class="entry-date" datetime="%1$s">%2$s</time></span>', esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); // // 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 ) ) . '"> ' . $category->name . '</a>' . $separator; } $categories_list = sprintf( '<span>%1$s %2$s', __( 'In', '__x__' ), 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 ) ) . '"> ' . $category->name . '</a>' . $separator; } $categories_list = sprintf( '<span>%1$s %2$s', __( 'In', '__x__' ), 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() ); $text = ( 0 === $number ) ? 'Leave a Comment' : sprintf( _n( '%s Comment', '%s Comments', $number, '__x__' ), $number ); $comments = sprintf( '<span><a href="%1$s" title="%2$s" class="meta-comments">%3$s</a></span>', esc_url( $link ), esc_attr( sprintf( __( 'Leave a comment on: “%s”', '__x__' ), $title ) ), $text ); } else { $comments = ''; } // // Output. // $categories_list = ""; $comments = ""; if ( x_does_not_need_entry_meta() ) { return; } else { printf( '<p class="p-meta">%1$s%2$s - %3$s%4$s</p>', $categories_list, $author, $date, $comments ); } }And, add the code below in your Appearance > Customize > Custom > CSS
.x-nav-articles { display: none !important; }Hope that helps. 🙂
August 23, 2016 at 11:50 am #1143408
mach0boiParticipantI’ve added these lines but I still didn’t get the results that I want. Author’s name still deleted
August 23, 2016 at 4:22 pm #1143781
JadeModeratorHi there,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1142091 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
