-
AuthorPosts
-
December 17, 2014 at 10:42 am #166477
Is there a way to make the post title show above the image instead of below the post image? I would like it to be post title, image then blog excerpt. As opposed to how it is now (image, post title, blog excerpt). Please reference http://mech-marketing.com
December 17, 2014 at 7:45 pm #166763Hi 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 copy the file “content.php” file which is located under “X/framework/views/integrity/” folder into your Child Theme’s respective location. Then you can edit the file using a text editor and replace it with the following code to make your changes.
<?php // ============================================================================= // VIEWS/INTEGRITY/CONTENT.PHP // ----------------------------------------------------------------------------- // Standard post output for Integrity. // ============================================================================= ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="entry-featured"> <?php x_get_view( 'integrity', '_content', 'post-header' ); ?> <?php x_featured_image(); ?> </div> <div class="entry-wrap"> <?php x_get_view( 'global', '_content' ); ?> </div> <?php x_get_view( 'integrity', '_content', 'post-footer' ); ?> </article>
Hope that helps.
December 17, 2014 at 9:44 pm #166801Would it be correct to assume this can be applied also to Icon stack by changing “integrity” to “icon” in the above code?
Thanks.
December 18, 2014 at 8:18 am #167036Hi Shawn,
Thanks for writing in!
The provided code is specifically for Integrity stack, if you require to have the same changes in Icon stack, the code will be different. You can let us know once you change the stack and we’ll be happy to help. 🙂
Thanks!
December 19, 2014 at 6:48 pm #167956OK yes if you are able to provide the code for Icon stack as well that would be great. I’d like to have the order: post title, image then blog excerpt.
Thanks!
December 21, 2014 at 1:32 pm #168392Hi Shawn,
For icon stack, the title should be already on top of the image.
Please check this http://theme.co/x/demo/icon/1/5-reasons-you-need-the-x-theme/
And you can verify it by checking the code.
<?php // ============================================================================= // VIEWS/ICON/CONTENT.PHP // ----------------------------------------------------------------------------- // Standard post output for Icon. // ============================================================================= ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="entry-wrap"> <?php x_icon_comment_number(); ?> <div class="x-container-fluid max width"> <?php x_get_view( 'icon', '_content', 'post-header' ); ?> <?php if ( has_post_thumbnail() ) : ?> <div class="entry-featured"> <?php x_featured_image(); ?> </div> <?php endif; ?> <?php x_get_view( 'global', '_content' ); ?> </div> </div> </article>
Where
<?php x_get_view( 'icon', '_content', 'post-header' ); ?>
appears before the featured image.Not sure what else you need.
Thanks.
December 22, 2014 at 1:57 am #168652Awesome thanks!
December 22, 2014 at 7:34 am #168878You’re welcome.
-
AuthorPosts