Tagged Questions
0
votes
1answer
89 views
get_the_excerpt() with fallback like the_excerpt()
You know when using the_excerpt() and no "excerpt" is set on a post it automatically uses the first 50 words or so.
Is the same also possible when using get_the_excerpt()
For instance I'm using ...
0
votes
1answer
98 views
add_filter on “the_excerpt” only works when post does not have excerpt
class my_menu extends WP_Widget
{
function widget($args, $instance)
{
// Excerpt length filter
$new_excerpt_length = create_function('$length', "return " . $excerpt_length . ";");
if ( ...
1
vote
1answer
64 views
Give “Read More” precedence over excerpt() word count
By default, the_excerpt() displays the content before the <!--more-->, trimming it at ~50 words.
Is there any way to prevent this trimming functionality when the <!--more--> is present, ...
1
vote
1answer
302 views
Add $more_link_text parameter to the_excerpt()
this filter is on the Wordpress Codex …
add_filter('excerpt_more', 'new_excerpt_more');
function new_excerpt_more($more) {
global $post;
return '<a class="moretag" href="'. ...
5
votes
3answers
3k views
apply_filters() and the_excerpt are giving unexpected results
I feel like I must be missing something pretty obvious, here, but I can't seem to get WordPress to cooperate.
I'm generating Facebook OG tags with a function. Everything works fine, except for the ...
1
vote
1answer
2k views
How to use the_excerpt in a filter hook?
I was hoping to process the_excerpt just like one would with the_content, but no such luck.
How can I pass the excerpts of a Posts Page, through my plugin? I've tried variations on this:
...