Tagged: x
-
AuthorPosts
-
October 13, 2016 at 3:40 am #1214314
SirRahikkalaParticipantHey
I have Icon stack in use and blog has the masonry layout. However the post meta shows only the date, nothing else. I need to show also category. In masonry grid as well in the post itself.
Child theme also in use.
October 13, 2016 at 6:14 am #1214464
ChristianModeratorHey there,
Please add the code below in your functions.php
// Custom Icon Entry Meta function x_icon_entry_meta() { $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>%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 ) ) . '">' . $category->name . '</a>' . $separator; } $categories_list = sprintf( '<span>%s</span>', trim( $categories_output, $separator ) ); } if ( x_does_not_need_entry_meta() ) { return; } else { printf( '<p class="p-meta">%1$s%2$s</p>', $date, $categories_list ); } }Hope that helps. 🙂
October 13, 2016 at 6:58 am #1214513
SirRahikkalaParticipantIt worked fine. I have one more question so lets not make more threads.
I have removed the sidebar from the search results page but it leaves padding-right 250px which is also defined at customizer as sidebar width. I would like to remove that padding-right but only from search results page. If I remove it from customizer sidebar width, the sidebar overlaps the blog page.
I am using this to remove the sidebar:
.search .x-colophon, .search .x-sidebar { display: none; } .search .x-main { width: 100%; }October 13, 2016 at 10:09 am #1214813
RupokMemberHi there,
Can you provide your URL if you still face this?
Thanks!
October 13, 2016 at 10:57 am #1214898
SirRahikkalaParticipantThis reply has been marked as private.October 13, 2016 at 3:43 pm #1215256
Nabeel AModeratorHi again,
Please add the following code in your Customizer via Appearance > Customize > Custom > Edit Global CSS:
body.search.x-content-sidebar-active { padding-right: 0 !important; }Let us know how this goes!
October 14, 2016 at 12:49 am #1215757
SirRahikkalaParticipantThank you!
October 14, 2016 at 1:31 am #1215783
RupokMemberYou are welcome. Have a nice day! 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1214314 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
