Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #151811

    sp_sam
    Participant

    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.

    #152008

    John Ezra
    Member

    Hi 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.php

    and 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!

    #266509

    hdarteaga
    Participant

    Hello,

    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.

    #266784

    Paul R
    Moderator

    Hi,

    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.

    #279619

    hdarteaga
    Participant

    Thank you that worked!

    #279859

    Friech
    Moderator

    Glad we could help, Cheers!

    #331442

    hdarteaga
    Participant

    Hi 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.

    #331556

    Rue Nel
    Moderator

    Hello 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.

    #331621

    hdarteaga
    Participant

    It worked thanks!!!

    #331727

    Rue Nel
    Moderator

    You are most welcome!
    We are glad we were able to help you out.