Using full posts instead of excerpts on a category page

Posted in: Newspaper
Post count: 45

Hello I am trying to display the full post on a category page. I’ve added the following code can you tell me if it is correct? The page keeps breaking. I’m using the post loop block.

//Add Full Post to Live Blog instead of excerpt
function show_full_post( $post ) {
if ( $post->post_type === ‘live-blog’ ) {
$post->set_excerpt( ” );
}
}

add_filter( ‘the_post’, ‘show_full_post’ );

or

function show_full_post( $post ) {
if ( is_category( ‘updates’ ) ) {
$post->set_excerpt( ” );
}
}

add_filter( ‘the_post’, ‘show_full_post’ );

Post count: 21065

Hello!

Please provide more information(screenshots/video) about what exactly you need to achieve or what is the issue there.

A solution for sending a screenshot/video is this:
Download, capture, and send: https://www.techsmith.com/jing-tool.html
After making the screenshot, you will have a link; paste it here.

Thank you!

Post count: 45

https://mavjournal.com/wp-content/uploads/2023/03/Screenshot-2023-03-28-at-9.40.59-PM.png

Here’s a screen shot. Essentially, I am trying to bring in the full post to the post loop instead of just utilizing the excerpt. However, I cannot have other pages displaying the full post so it really needs to be restricted to just this page.

Does that help?

Post count: 21065

Hello!

I think you can achieve what you need without using any code.
Choose to stretch the row and content. Hide the items you do not need from the block in the layout tab of the post loop settings.
If you can’t handle it, then I can try to help you. Please contact us via email at contact@tagdiv.com and provide the following:
– admin url and credentials
– a link to this topic in order to identify you

Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.