Hello Jean-Pierre,
If you want to add the portfolio item content to in each of the portfolio item on the portfolio page, you may try adding this code in the functions.php:
// 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>
<span><?php echo get_the_content(); ?></span>
</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_content(); ?></span>
</div>
</a>
</article>
<?php }
}
endif;
The area in the code where the content is added is the line <?php echo get_the_content(); ?>
.
You may use the get_the_excerpt();
if you want the shorter content version.
Please note that this line will output all the content of the that is in the content area set in the portfolio item.
You will also have to adjust the CSS of the entry cover area by adding this to the Global CSS:
.page-template-template-layout-portfolio .h-entry-cover {
top: calc(100% - 6em);
}
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.