Tagged: x
-
AuthorPosts
-
August 2, 2016 at 10:12 am #1113869
MatthMParticipantHello,
I have two questions about Ethos:
FIRST:
I’ve read a post in the forum concerning the use of a full-screen video (revolution slider) on a boxed layout for the Ethos stack.
I’ve added this to my custom CSS:
/*.x-boxed-layout-active .site {
overflow-x: visible;
}*/So far so good. Everything is working like I want: http://www.jamesbold.work
But as a result of this extra CSS the background image is not repeating anymore on my post pages, as you can see here: http://www.jamesbold.work/atelier-v-the-catering-company/
The grey image should be repeated as it is on the homepage.SECOND:
I would like to place the ‘post category’ direct under the post title in my posts (http://www.jamesbold.work/atelier-v-the-catering-company/). I use the category to add a client name to the post and I would like to combine the client name with the post title. How can I manage that?
Please take a look at the image attached.Thank you.
August 2, 2016 at 10:13 am #1113873
MatthMParticipantHere is the image again …
August 2, 2016 at 11:03 am #1113958
RupokMemberHi there,
Thanks for writing in!
#1. You can try this instead :
.x-boxed-layout-active .site { overflow-x: auto; }#2. You can enable Post meta from Customzie > Blog – http://prntscr.com/c0pts5
Hope this helps.
Cheers!
August 2, 2016 at 3:58 pm #1114454
MatthMParticipantHi,
Solution #1 is not working.
Solution #2 is working, but how can I put the meta above the post title en only display the category and not the author and the date?
http://www.jamesbold.work/atelier-v-the-catering-company/
Thank you, again!
August 3, 2016 at 12:51 am #1114965
ChristopherModeratorHi there,
Please add following code in Customize -> Custom -> CSS :
.x-container.main:before { background-color: transparent; }Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
Please add following code in child theme’s functions.php file :
// Entry Meta // ============================================================================= if ( ! function_exists( 'x_ethos_entry_meta' ) ) : 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. // 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 ); } } endif;Hope it helps.
August 3, 2016 at 3:32 am #1115087
MatthMParticipantEverything is working fine. Thank you for the great support. This is the best theme ever.
One last question:
I don’t want the ‘category’ to be a link (but just txt) on the post page and I would like to position it above the Post title (entry-title). How can I fix that?
August 3, 2016 at 6:10 am #1115236
ChristopherModeratorHi there,
Copy _content-post-header.php from framework/views/ethos and put it in the same path inside child theme, replace existing code with following :
<?php // ============================================================================= // VIEWS/ETHOS/_CONTENT-POST-HEADER.PHP // ----------------------------------------------------------------------------- // Standard <header> output for various posts. // ============================================================================= ?> <header class="entry-header"> <?php x_ethos_entry_meta(); ?> <?php if ( is_single() ) : ?> <?php x_entry_navigation(); ?> <h1 class="entry-title"><?php the_title(); ?></h1> <?php else : ?> <h2 class="entry-title"> <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php x_the_alternate_title(); ?></a> </h2> <?php endif; ?> </header>Add this JS under Customize -> Custom -> JavaScript :
jQuery("p.p-meta a").removeAttr("href");Hope it helps.
August 3, 2016 at 6:37 am #1115256
MatthMParticipantThank you!
August 3, 2016 at 8:23 am #1115358
Paul RModeratorYou’re welcome! 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1113869 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
