Only blog title showing up in the masonry style

Hi,

I am using masonry style in the blog pate for listing the blogs. Currently, only blog title is being shown for each post. How to get shown not only the blog title but also author, categories, publishing date.

I cannot find any setting configuring this.

Best regards,

–Mardas

Hi Mardas,

Please go to X > Theme Options > Blog then enable the Post Meta option.

Hope this helps.

Many thanks for the info. It is enabled but only the post title is showing up…

Hi Mardas,

I have checked your site and your blog page is set to be on Masonry layout. The Masonry layout only display the title for alignment purposes but it is possible to have the Post Meta display.

Please install and activate the child theme and login through FTP then edit the functions.php then add this code:

// Entry Cover
// =============================================================================

if ( ! function_exists( 'x_ethos_entry_cover' ) ) :
  function x_ethos_entry_cover( $location ) {

    if ( $location == 'main-content' ) { ?>

      <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
        <a class="entry-cover" href="<?php the_permalink(); ?>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>">
          <h2 class="h-entry-cover">
            <span><?php x_the_alternate_title(); ?></span>
            <div class="x-post-meta">
              <span class="entry-cover-author"><?php echo get_the_author(); ?></span>
              <span class="entry-cover-categories"><?php echo x_ethos_post_categories(); ?></span>
              <span class="entry-cover-date"><?php echo get_the_date( 'F j, Y' ); ?></span>
            </div>
          </h2>
        </a>
      </article>

    <?php } elseif ( $location == 'post-carousel' ) { ?>

      <?php GLOBAL $post_carousel_entry_id; ?>

      <article <?php post_class(); ?>>
        <a class="entry-cover" href="<?php the_permalink(); ?>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>">
          <h2 class="h-entry-cover"><span><?php ( $post_carousel_entry_id == get_the_ID() ) ? the_title() : x_the_alternate_title(); ?></span></h2>
          <div class="x-post-carousel-meta">
            <span class="entry-cover-author"><?php echo get_the_author(); ?></span>
            <span class="entry-cover-categories"><?php echo x_ethos_post_categories(); ?></span>
            <span class="entry-cover-date"><?php echo get_the_date( 'F j, Y' ); ?></span>
          </div>
        </a>
      </article>

    <?php }

  }
endif;

Then add this code in X > Theme Options > CSS:

.h-entry-cover {
    top: calc(100% - 7em);
}

.h-entry-cover .x-post-meta {
    text-transform: none;
    padding: 5px 0;
    line-height: 1.25em;
}

Kindly note that since this is a custom code that changes the default behavior/display of the theme, you will be responsible to maintain or update the code in case you require further changes or if the code stops working in future updates. If you are uncertain how to proceed, it would be best to get in touch with a developer.

Hope this helps.

Awesome!

Many thanks!

You are most welcome. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.