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

    bshellz
    Participant

    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

    #166763

    Darshana
    Moderator

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

    #166801

    Shawn N
    Participant

    Would it be correct to assume this can be applied also to Icon stack by changing “integrity” to “icon” in the above code?

    Thanks.

    #167036

    Zeshan
    Member

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

    #167956

    Shawn N
    Participant

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

    #168392

    Rad
    Moderator

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

    #168652

    bshellz
    Participant

    Awesome thanks!

    #168878

    Christopher
    Moderator

    You’re welcome.