Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1050475
    SixTsevN
    Participant

    Hey there,

    I’ve downloaded the X Child Theme, installed and activated. I just want to know the process to importing a file to override the parent theme.

    Do I just copy (for example, single.php) and paste the file in the child theme directory?
    What is the correct approach to this?

    Thank you for your time,
    – SixT.

    #1050502
    Christian
    Moderator
    #1050544
    SixTsevN
    Participant

    That article was very helpful but, I don’t see anything referring to the expanded themes. I don’t see them in the “views” directory. Is there a different process to importing their files? I’m using agency.

    #1050590
    Joao
    Moderator

    Hi There,

    The expanded demos work exactly the same like the others. The only difference between the expanded demos and the standard is that the expanded demos come with some inner pages ready, like contact, about us etc… But regarding the child theme changes there is no difference.

    Agency Demo uses Ethos Stack.

    Could you clarify what you are trying to achieve in order that we can help you? Thanks

    Joao

    #1050669
    SixTsevN
    Participant

    Oh great, that’s what I needed to know about the Agency Demo.

    I’m trying to remove the featured image, displayed in my posts. While keeping it displayed in my blog carousel.
    I just remove the part about displaying thumbnail in single.php, right?

    #1050760
    Christian
    Moderator

    No, though that is the starting point. If you open single.php, you will see only one line of code and that is

    <?php x_get_view( x_get_stack(), 'wp', 'index' ); ?>

    x_get_view function basically says get the Stack directory which is wp-content\themes\x\framework\views\ethos in the case of the Agency expanded demo then get the file with a wp prefix and followed by index so that is wp-index.php. That is not yet the file you’ll need to modify for your case as that still points to other files. The file you’ll need to copy to your child theme and modify is framework\views\ethos\content.php

    Hope that helps. 🙂

    #1052310
    SixTsevN
    Participant

    Okay so I copied the file directory “framework/views/ethos/content.php” to my child theme, including the content.php file. I removed the div with the class “entry-featured” but, it made no difference to my post at all. Which is bizaar. I assume this is a caching issue, but I cleared my wordpress cache and my browser cache. Am I still doing something wrong?

    #1052388
    Thai
    Moderator

    Hi There,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thanks.

    #1052399
    SixTsevN
    Participant
    This reply has been marked as private.
    #1052533
    Paul R
    Moderator

    Hi,

    Ftp login doesn’t seem to work.

    Kindly check again and let us know.

    Thanks

    #1055683
    SixTsevN
    Participant
    This reply has been marked as private.
    #1055892
    Rue Nel
    Moderator

    Hello There,

    I am now logged in to your ftp. I see your changes and confirm that it is correct. Regretfully I cannot check the output because I cannot login to your site. The password is not working for me (http://prntscr.com/bjw694).

    For the meantime, please make sure that the child theme is active. And another thing, if you are using post format, you also need to copy and edit the content-{format}.php file into your child theme.

    Hope this helps.

    #1055975
    SixTsevN
    Participant

    I was formatting the post as an image post but, I couldn’t find content-{format}.php.
    However, I was able to achieve the functionality I was looking for.

    In order to display the featured image in the indexed part of the blog page, while also displaying in the carousel but, not in the actual post. I had to re-upload content.php and modify it less.

    <?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; ?>
          </div>
        <?php endif; ?>
        <div class="entry-wrap">
          <?php x_get_view( 'ethos', '_content', 'post-header' ); ?>
          <?php x_get_view( 'global', '_content' ); ?>
        </div>
      <?php endif; ?>
    </article>

    I simply removed this segment:

    <?php else : ?>
         <?php x_featured_image(); ?>

    Then set the formatting to “standard”.

    #1055984
    SixTsevN
    Participant

    Thank you to all the themeco staff, who took their time to help me with this issue.
    Couldn’t have done it, without each of your contributions.

    #1056135
    Lely
    Moderator

    You’re welcome!

    Glad we were able to help.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1050475 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>