-
AuthorPosts
-
November 24, 2014 at 12:10 pm #151811
All of my posts will be video posts, but will also contain text content. We’d like to show the video plus the excerpt on the blog archive page. So a combination of what is shown for Video posts and Standard posts. I’m trying to determine which file I need to add “the_excerpt();” to display it beneath the featured video.
Using a Renew Child Theme of X Theme 2.6 on WordPress 4.0.
Thank you.
November 24, 2014 at 5:08 pm #152008Hi there!
Thanks for posting in.
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 you would need to copy the content-video.php
found here /wp-content/themes/x/framework/views/renew/content-video.phpand paste it into your child theme /wp-content/themes/x-child-renew/framework/views/renew/content-video.php
you would then alter the code like so:
<?php // ============================================================================= // VIEWS/RENEW/CONTENT-VIDEO.PHP // ----------------------------------------------------------------------------- // Video post output for Renew. // ============================================================================= ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="entry-wrap"> <?php x_get_view( 'renew', '_content', 'post-header' ); ?> </div> <?php if ( is_single() ) : ?> <div class="entry-featured"> <?php x_featured_video(); ?> <?php x_get_view( 'global', '_content', 'the-content' ); ?> <?php x_get_view( 'renew', '_content', 'post-footer' ); ?> <?php else : ?> <div class="entry-featured"> <?php x_featured_video(); ?> <?php the_excerpt(); ?> <?php endif; ?> </div> </article>
That should do it! Hope this helps!
May 5, 2015 at 6:57 pm #266509Hello,
I’m currently using the renew stack and have the same issue. I understand that I need to create a child theme which I will do, but currently on my “staging site” (http://synthesis1.fantasktic.com/blog/) the content-video.php you mentioned above does not exist in my wordpress editor.
Just to reiterate the issue, I would like the experts for video posts (all posts for that matter) to be visible on my main blog page.
I also viewed this post (https://theme.co/x/member/forums/topic/blog-list-not-displaying-excerpt-when-featured-image-is-present/) and the content.php file described in that post is also not showing within my wordpress editor.
What would be the correct code and php file for my site?
P.S My wordpress and xtheme are up to date.
May 6, 2015 at 2:10 am #266784Hi,
You need to use FTP(Filezilla) to be able to see the files.
You need to copy the files content-video.php,content-audio.php,content-gallery.php,content-image.php from wp-content/themes/x/framework/views/renew/ into your child theme wp-content/themes/x-child/framework/views/renew/
Then add the code below in all files before the code that reads
<?php if ( is_single() ) : ?> <?php x_get_view( 'global', '_content', 'the-content' ); ?>
Code to be added
<?php if(is_home()): ?> <?php x_get_view( 'global', '_content', 'the-excerpt' ); ?> <?php endif; ?>
Hope that helps.
May 22, 2015 at 1:09 pm #279619Thank you that worked!
May 22, 2015 at 8:43 pm #279859Glad we could help, Cheers!
July 15, 2015 at 3:49 pm #331442Hi regarding this same topic what code do I need to add within my child theme for me not only to have the excerpt but to the full length post be shown on the blog homepage.
http://billygeneismarketing.com
P.S WordPress and theme are up to date.
July 15, 2015 at 7:15 pm #331556Hello There,
Please refer to our previous reply https://community.theme.co//forums/topic/display-video-excerpt-for-video-post-types-on-archive-page-using-renew-stack/#post-266784
And instead of adding this code:
<?php if(is_home()): ?> <?php x_get_view( 'global', '_content', 'the-excerpt' ); ?> <?php endif; ?>
Please replace it with this code to display the fullwidth:
<?php if(is_home()): ?> <?php x_get_view( 'global', '_content', 'the-content' ); ?> <?php endif; ?>
Hope this helps. We’d loved to know.
July 15, 2015 at 8:46 pm #331621It worked thanks!!!
July 15, 2015 at 11:40 pm #331727You are most welcome!
We are glad we were able to help you out. -
AuthorPosts