Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1177935
    Alex
    Participant

    Hello,

    I’m using the Icon stack here:

    http://superpokemonworld.com/pokemon-go/pokemon-go-get-starter-pikachu/

    I’d like to move the meta (currently it shows only the date) below the featured image:

    http://take.ms/Gb0jrK

    Or, if it’s not really possible to achieve easily, at least align it on the left under the title.

    Could you give me a hint on how to do either of these?

    Thanks.


    Alex

    #1178288
    Lely
    Moderator

    Hello Alex,

    Please copy _content-post-header.php file from \wp-content\themes\x\framework\views\icon to the same folder on child theme: \wp-content\themes\x-child\framework\views\icon.
    Open the copied file and then on line 19, remove the following line:
    <?php x_icon_entry_meta(); ?>
    Final code of _content-post-header.php file on your child theme will be like this:

    <?php
    
    // =============================================================================
    // VIEWS/ICON/_CONTENT-POST-HEADER.PHP
    // -----------------------------------------------------------------------------
    // Standard <header> output for various posts.
    // =============================================================================
    
    ?>
    
    <header class="entry-header">
      <?php if ( is_single() ) : ?>
        <h1 class="entry-title"><?php the_title(); ?></h1>
      <?php else : ?>
        <h2 class="entry-title">
          <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php x_the_alternate_title(); ?></a>
        </h2>
      <?php endif; ?>
      <?php x_icon_entry_meta(); ?>
      <?php if ( get_post_format() == 'quote' ) : ?>
        <p class="entry-title-sub"><?php echo get_post_meta( get_the_ID(), '_x_quote_quote', true ); ?></p>
      <?php endif; ?>
    </header>

    That step will remove your current meta from it’s original position below the title. Now we will add it to the new location which is below the featured image. Please copy content.php file from \wp-content\themes\x\framework\views\icon to the same folder on child theme: \wp-content\themes\x-child\framework\views\icon. Open the copied file and then add the line that we have deleted from the first file in between this two lines:

          <?php endif; ?>
          <?php x_get_view( 'global', '_content' ); ?>

    Final code should be like this:

    <?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 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_icon_entry_meta(); ?>
          <?php x_get_view( 'global', '_content' ); ?>
        </div>
      </div>
    </article>

    To move the text on the left side, please add the following on Appearance > Customize > Custom > Edit Global CSS:

    .p-meta>span {
        display: block;
        margin: 0;
        text-align: left;
    }

    Hope this helps.

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