- This topic has 5 replies, 2 voices, and was last updated 3 years, 3 months ago by
David.
-
AuthorPosts
-
January 21, 2023 at 8:10 am #2504072
Manoj
Hi
Is there a way to remove the entry-content from Post Format Image stories on Archive page?
Also the Excerpt text is not showing to all Post Format Image stories.Thanks
January 22, 2023 at 4:02 am #2504609David
StaffCustomer SupportHi there,
do you have any custom functions or templates that would change the behaviour of the archives ?
Reason i am asking, the posts in that archive are showing the Entry Content ( Full post content ) not the Entry Summary ( Excerpt ) that i would expect to see.
January 23, 2023 at 2:59 am #2505563Manoj
Nope, I’m using the default template for Photos Archive page.
If you see, there are two stories on the page and both are showing differently.– First one is showing the Entry Content (Full post content).
– Second one is showing Entry Summary (Excerpt)Thanks
January 23, 2023 at 9:41 am #2506144David
StaffCustomer SupportI think we would need a separate template for those, as the theme doesn’t have a content template for the image format.
So if you have a child theme, you could save your own
content-image.phptemplate.
And inside that add this:<?php /** * The template for displaying format image posts within the loop. * * @package GeneratePress */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php generate_do_microdata( 'article' ); ?>> <div class="inside-article"> <?php /** * generate_before_content hook. * * @since 0.1 * * @hooked generate_featured_page_header_inside_single - 10 */ do_action( 'generate_before_content' ); if ( generate_show_entry_header() ) : ?> <header <?php generate_do_attr( 'entry-header' ); ?>> <?php /** * generate_before_entry_title hook. * * @since 0.1 */ do_action( 'generate_before_entry_title' ); if ( generate_show_title() ) { $params = generate_get_the_title_parameters(); the_title( $params['before'], $params['after'] ); } /** * generate_after_entry_title hook. * * @since 0.1 * * @hooked generate_post_meta - 10 */ do_action( 'generate_after_entry_title' ); ?> </header> <?php endif; /** * generate_after_entry_header hook. * * @since 0.1 * * @hooked generate_post_image - 10 */ do_action( 'generate_after_entry_header' ); /** * generate_after_entry_content hook. * * @since 0.1 * * @hooked generate_footer_meta - 10 */ do_action( 'generate_after_entry_content' ); /** * generate_after_content hook. * * @since 0.1 */ do_action( 'generate_after_content' ); ?> </div> </article>That will remove the entry-content altogether
January 24, 2023 at 1:01 am #2506790Manoj
Hi David,
Thank you so much for the template code and it fixed the issue.
January 24, 2023 at 4:51 am #2506974David
StaffCustomer SupportGlad to hear that!!
-
AuthorPosts
- You must be logged in to reply to this topic.