I have disabled each plugin one by one, cleared cache after each disable, refreshed page with caching disabled and the problem still persists.
In the theme, there are only two references to the_excerpt, and they don’t do anything to change the behavior, they just call the function.
In wp_posts table, the excerpt column, I think it’s called, or post_excerpt, is empty.
I am using a child theme, but I overwrote my changes for template-parts/content* to what the parent theme contains, the behavior remains the same.
I don’t know where to look next. I’m don’t code in php, but mildly comfortable enough to look through it. My next move is to setup a clean WordPress instance somewhere, copy the theme over, import the database, then add plugins one by one to see if I can replicate it. However, that’s a lot of work and I’ve spent a lot of time on this already, so hoping someone knows of something that can cause this or knows something else I can look at. I’ve seen something like this in Perl, but not sure how to empty the value of the_excerpt before the loop runs again, or if that might be the appropriate route.
Any help is appreciated.
]]>I developed custom blocks for my news blog posts and the_excerpt is not working anymore.
<!-- wp:qsd/section -->
<!-- wp:qsd/container {"className":"container"} -->
<!-- wp:paragraph -->
<p>Hello World.</p>
<!-- /wp:paragraph -->
<!-- /wp:qsd/container -->
<!-- /wp:qsd/section -->
That’s my structure of every blog post. If i create a simple paragraph before the custom block the_excerpt is working for that paragraph.
I tried stuff with get_the_content(), serialize_blocks(), parse_blocks() and str_replace(). But this solution is so messy!! There must be another way, right?
Thanks for help!
]]>i try to show the excerpt on a page without content permission.
I looked into the code at /inc/functions-content-permissions.php
on line 148 and 149 you where adding the filter to replace the excerpts content with the permission error message. https://github.com/caseproof/members/blob/c6556a93def04d0a6bbf65bad57a2ef3f5e1c729/inc/functions-content-permissions.php#L148
When i display the excerpt directly on the same page the error message comes up double and showing the excerpt would not break the permission in my case.
I tried the following:
add_action('init', 'myPlugin_init');
function myPlugin_init(){
remove_filter('get_the_excerpt', 'members_content_permissions_protect', 95);
remove_filter('the_excerpt', 'members_content_permissions_protect', 95);
}
https://developer.www.ads-software.com/reference/functions/remove_filter/
but it still shows up.
also i looked into the filter ‘members_post_error_message’ but i can’t determine if its shown at a content, excerpt or comment field.
i would apprechiate any pointer to the right direction
best
tom
First, I would like to edit one featured area so that the_content is displayed instead of the_excerpt. The code for this is in functions.php and I am unsure how to modify it in a child-theme-friendly way (without defining a new function)
Second, I would like to increase the excerpt length on other featured areas. This theme contains a file (modules/admin_modules/excerpt_length.php) which one would think would apply here…but editing this and saving in the child theme directory has no impact.
Any guidance is appreciated.
]]>function tower_set_excerpt_length(){
return 40;
}
Here is what is inside my content-posts template part for single.php:
<div class="entry-content">
<?php the_excerpt(); ?>
</div>
I am getting the excerpt for my blog post but it’s not getting cut off at 40 words and my excerpt is 44 words. I tried CTRL+F5 to clear my cache just in case it was that. Any idea what I need to do?
The link is to my blog page which has one post (site is only a few days old).
]]>the_excerpt
So I used this code.
add_filter( 'the_excerpt', 'filter_the_excerpt', 10, 2 );
function filter_the_excerpt( ) {
return ' ';
}
But this function also removed the Read More button
How to disable the_excerpt
without removing the readmore button.
I am using WordPress 5.3 and I want to show excerpt on my website, but is not working.
I configured “add_post_type_support(‘page’, ‘excerpt’);” and it is working.
After that I tried to include with the_excerpt() and get_the_excerpt(), but it is not showing the text. Can someone help me?
<?php if (has_excerpt()) : ?>
<h3 class="h3">
<?php the_excerpt(); ?>
</h3>
<?php endif; ?>
]]>Imported demo content’s post excerpt is not displaying but when I create a new post, it’s excerpt will be displayed.
What’s and where the problem?
Help me!
Thanks in advance.
What confuses me is that – it only happens with MOST but not all themes.
In WP settings I have Default Post Settings set to STANDARD
and under reading I have FULL TEXT selected.
I can’t understand if I should be looking in WP, or whatever theme CSS that I am using
Can anyone point me along the right path?
Thank you and happy 2019
]]>