Tagged: x
-
AuthorPosts
-
October 10, 2016 at 9:11 am #1209966
Nico ColluParticipantHello!
I’m looking to create a working, responsive version of having the title + meta sit over the featured image. The title should sit vertically centered without moving when the browser is resized other than possible @media changes due to text needing to be responsive.
It’s a bit of a shame that there isn’t an option in X Theme to de-activate the current post title/featured image and replace it with an actual Element with much more customization options. Is this a future possibility on the list?
Let me know! 🙂
October 10, 2016 at 9:38 am #1209999
Nico ColluParticipantFor this to work, I’m guessing I need to change some HTML as well within the theme files. I have a child theme FYI.
Which file is it exactly where I can place the entry-header within the featured image div?
October 10, 2016 at 10:32 am #1210087
ThaiModeratorHi There,
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.
Then navigate to your child theme’s /framework/views/ethos directory create a file named content.php and paste the code below:<?php // ============================================================================= // VIEWS/ETHOS/CONTENT.PHP // ----------------------------------------------------------------------------- // Standard post output for Ethos. // ============================================================================= $is_index_featured_layout = get_post_meta( get_the_ID(), '_x_ethos_index_featured_post_layout', true ) == 'on' && ! is_single(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if ( $is_index_featured_layout ) : ?> <?php x_ethos_featured_index(); ?> <?php else : ?> <?php if ( has_post_thumbnail() ) : ?> <div class="entry-featured"> <?php if ( ! is_single() ) : ?> <?php x_ethos_featured_index(); ?> <?php else : ?> <?php x_featured_image(); ?> <?php endif; ?> <?php x_get_view( 'ethos', '_content', 'post-header' ); ?> </div> <?php endif; ?> <div class="entry-wrap"> <?php x_get_view( 'global', '_content' ); ?> </div> <?php endif; ?> </article>Hope it helps 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1209966 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
