0
votes
1answer
246 views

How to get the post excerpt using post object?

I'm trying to show post excerpt as in navigation. I'm trying this in plugin, does it make any sense? i don't know. I used $nex_obj = get_adjacent_post(false, '', true); for next post and it returns ...
0
votes
1answer
142 views

Unable to change the “Read more” text inside the_excerpt

I am unable to change the "Read more" text while using the excerpt. I've tried the following code: function new_excerpt_more( $more ) { return ' <a class="read-more" href="'. get_permalink( ...
0
votes
1answer
153 views

Why is the output of a call to the_excerpt different when the call seems to be identical?

Ok I've been asked to fix a problem on a website that is a bit weird. The index page (template-magazine.php) here, Has this bit of code: <?php get_template_part('loop'); ?> to produce a ...
0
votes
1answer
127 views

“the_excerpt” in loop just keeps repeating first post?

I'm trying to edit the loop in my archive.php template so that when I visit a category page, it only displays the post excerpt and uses the featured image as a thumbnail. When I add the_excerpt() to ...
1
vote
2answers
188 views

Combining the_excerpt with the_content

I have some html: <div class="container"> <p class="accent">The first paragraph...</p> <p>The rest of the article...</p> </div> I'd like to put "the_excerpt" in ...
3
votes
5answers
16k views

Get excerpt using get_the_excerpt outside a loop

I have a code that call get_the_title() and it works, but get_the_excerpt() return empty. How can i make it work? This code is inside a plugin called "WP Facebook Open Graph protocol". Here's the ...
0
votes
1answer
485 views

Problem in replacing the_content with the_excerpt()

I want to add read more to a blog. For that I need to replace the function the_content(). I found it in the loop file and replaced it with the_excerpt() but still posts are being shown of full length. ...
2
votes
1answer
909 views

the_excerpt(), get_the_excerpt() and the_content() all killing “the Loop”

Before I call the_excerpt(), the_permalink() displays the correct thing. Afterwards, it does not... <?php global $query_string; //strip out the ...
0
votes
1answer
426 views

Calling the_excerpt from inside a plugin template file

Im trying to use the_excerpt form inside a plugins template file, plugin is wp-favorite-posts by default the plugin only lists and displays the saved post title, i have manged to get it to show ...
0
votes
1answer
829 views

How do I pull excerpts from pages?

So I enabled custom excerpts on my pages with this function. add_action('init', 'page_excerpts'); function page_excerpts() { add_post_type_support( 'page', 'excerpt' ); } However, When I enter ...
1
vote
2answers
2k views

Content/Excerpt length control for a specific loop?

Is it possible to control the length of the content or excerpt for a specific query/loop? I have come across the following code, but this changes the length for all excerpts, I want it focused on a ...