Displays the excerpt of the current post with the "[...]" text at the end, which is not a "read more" link. Used to directly display the excerpt, but it adds opening and closing tags to the string returned by get_the_excerpt().

learn more… | top users | synonyms

8
votes
2answers
460 views

Compare the_excerpt() to the_content()

Is there a way to compare the_excerpt() to the_content() to know if the_excerpt() is actually showing the entire post content? for instance, if a post were particularly short. ultimately i'd like to ...
7
votes
3answers
6k 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 ...
4
votes
2answers
397 views

How to get the unfiltered excerpt, without […] or auto-excerpting

The standard way of getting an excerpt is to use the_excerpt() or get_the_excerpt() template tags. I am trying to get just the actual content of the Excerpt field. If there is an excerpt, I want to ...
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 ...
3
votes
1answer
968 views

First three images in post excerpt

I have certain posts that are nothing but [gallery] with quite a few images in them. Is there a way to define an auto generated excerpt to only display the first three images for these posts on the ...
3
votes
1answer
3k 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: ...
3
votes
1answer
3k views

How to override function in functions.php of parent theme?

I have created child of theme twentyten. I tried to override function written below /** * Returns a "Continue Reading" link for excerpts * * @since Twenty Ten 1.0 * @return string "Continue ...
3
votes
1answer
386 views

How to call the_excerpt() with tags or the_content() as an excerpt?

Is it possible to call the_excerpt() with tags intact? I'd like to create a excerpted listing of my posts in a specific category, but I'd also like the links and formatting carried over from the post ...
3
votes
1answer
544 views

When is wp_trim_excerpt() called?

There doesn't appear to be any reference to wp_trim_excerpt() outside of it's declaration - I've checked both the Trac and Xref - when does it work its magic?
3
votes
3answers
2k views

Remove “Continue Reading” Link From the Teaser Excerpt Only

I want to remove the "Continue Reading" link from the teaser excerpt only and not from the automatic excerpt, which filter is easily available. This is the original code; it's from the Showcase ...
2
votes
3answers
677 views

excerpt in characters

I have code in functions.php: function string_limit_words($string, $word_limit) { $words = explode(' ', $string, ($word_limit + 1)); if(count($words) > $word_limit) array_pop($words); ...
2
votes
2answers
1k views

How to return the_excerpt (without echo)?

Hey all, I see that get_the_excerpt() echoes the post excerpt if it is manually set, but not if it is automatically generated (with just the 55 words, for example). [and its use is deprecated] ...
2
votes
1answer
440 views

The excerpt: Display text OR image OR video

Is it possible to adjust the excerpt so it will show text or one image or one video? The following codes makes it possible to show all of the above, but i'd really like to limit that, dependent of ...
2
votes
1answer
504 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="'. ...
2
votes
2answers
6k views

How to get attachment caption (get_the_excerpt gives parent post excerpt) ?

I am displaying the attachments on the parent post page with this code : $args = array('post_type' => 'attachment', 'post_mime_type' => 'image', 'order'=> 'ASC', 'numberposts' => ...
2
votes
3answers
354 views

How to show video from specific category on sidebar?

I need to get video and content from recent posts in specific category called "Video" and show it on my sidebar. The problem is when I need to have limited text content. so, when I use the_content(); ...
2
votes
1answer
2k views

How to include line-breaks in the_excerpt?

how can I include a line-break inside the_excerpt. I’ve modified the length and the more-button via my functions.php. I’m using teaser for every blog-entry and sometimes it looks a bit ugly, that ...
2
votes
1answer
916 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 ...
2
votes
0answers
84 views

Getting the_excerpt to link to child pages [closed]

I'm using the Twentyeleven 'continue reading' function for my excerpts function twentyeleven_continue_reading_link() { return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Read more', ...
1
vote
3answers
3k views

Display Links in Excerpts?

I'm having a problem with the_excerpt and can not find the answer anywhere... I simply want to allow links to be clickable when they are displayed via the_excerpt! There has to be a function for ...
1
vote
3answers
2k views

the_excerpt() not showing manual excerpt for Pages

I have enabled the excerpt feature for pages in my wordpress theme - add_action( 'init', 'my_add_excerpts_to_pages' ); function my_add_excerpts_to_pages() { add_post_type_support( ...
1
vote
1answer
188 views

How can I list recent posts excerpts?

I am using this directly from the codex to list 3 recent articles titles. <ul> <?php $args = array( 'numberposts' => '3'); $recent_posts = wp_get_recent_posts( $args ); foreach( ...
1
vote
2answers
190 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 ...
1
vote
1answer
158 views

Limit the_excerpt in the first point (.) of the sentence

I would like to filter the function the_excerpt to stop to find the first endpoint. Ex: "This is the article summary which ends at the endpoint with a full-stop." Any idea is welcome.
1
vote
2answers
497 views

Remove images from get_the_excerpt

I'm using a custom function to create a shortcode that displays the latest blog post on the home page of a template. But I'm trying to NOT have it display any images. I know I can use the Advanced ...
1
vote
2answers
2k views

Limit the_excerpt with max of x characters

What I'm trying to do: I want to display the_excerpt, but I have a maximum of x characters the_excerpt may use, but I don't want to display a couple of characters of a word, only whole words. Some ...
1
vote
2answers
718 views

the_excerpt() or get_the_excerpt with shortcode escape

I have few posts which have a dropcap shortcode wrapped around the first character like so: [dropcap]T[/dropcap]his is a dropcap. The replacement for this shortcode yields: <span ...
1
vote
1answer
859 views

Adding Videos as post-thumbnails (no stills, just the player in a smaller size)

I’m using Excerpts with post-thumbnails on my startsite. Adding Images is working pretty fine. But how can I embed a video from vimeo or youtube as a post-thumbnail? Just the video in a smaller size, ...
1
vote
2answers
537 views

Different 'read more' links

Is there an easy way to add another 'read more' link? I'm using the standard 'continue reading' link for some posts but I also want to use a different text like 'more info' for other posts. Can I do ...
1
vote
1answer
623 views

the_excerpt(); tag not working

I am having a problem with the the_excerpt(); tag which I am using in my own theme in the index.php and archive.php files. The code is below: index.php <?php get_header(); ?> <section ...
1
vote
2answers
227 views

Disabling automatic teasers

I have a custom theme that displays the excerpt: $data = get_the_excerpt(); if ($data) echo "<div class='excerpt'>$data</div>"; if nothing is entered in the excerpt field in ...
1
vote
1answer
1k views

How to make the excerpt_more filter apply to the actual post excerpt?

In the get_blog_excerpt() function below, the excerpt_more filter works perfectly when the post excerpt is not present, however, when the post has an excerpt, I'm not getting the "Read More" link. I ...
1
vote
1answer
179 views

How to obtain a reference to the_excerpt() from custom loop

I have a script in archive.php, which is outside the loop, that calls on the function get_blog_links() to list all posts that belong the the current category (my "blog" category). I'm trying to do ...
1
vote
1answer
733 views

excerpt - don't use main content if empty

trying to stop get_the_excerpt() from defaulting to the_content() if its empty. this kinda works - well it seems to return 'xxx' so i think has_excerpt() isn't working? function get_link_excerpt(){ ...
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 ...
1
vote
0answers
41 views

Best way to handle Post-Format Video without using the_content?

I have read the Codex and I'm about 3 hours searching around sites for a deep understanding of post-formats but got no answer. Don't know if it is a dumb question but after spending a long time ...
1
vote
0answers
110 views

Query Pages and post excerpts dynamically

I have a custom home page, a blog page which includes a dynamic preview area of the latest 5 blogs, and some other miscellaneous pages. Im trying to design an "events" page where the main page has a ...
1
vote
1answer
101 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
72 views

How to change the length of excerpt() method?

I am using the_excerpt() method to display some wordings from the blog posts. I have read the post from this link. http://codex.wordpress.org/Plugin_API/Filter_Reference/excerpt_length But my ...
0
votes
1answer
1k views

Remove Ellipses from Excerpt

I use two custom functions for my excerpts, the first modifies the length of the excerpt and the second allows me to use the_excerpt in two ways - with a read more link and without as long as the ...
0
votes
3answers
313 views

the_excerpt - want to modify password protected output

I'm looking to modify the output of the_excerpt when there isn't an excerpt specified and the post is password protected. I already can modify the password protected form to whatever I want, but ...
0
votes
1answer
225 views

Problem on the_excerpt(); function <the_excerpt> <the_content>

I am working on wordpress but I have problem when I write the_content('read more'); then on indexpage each post load full data of post but I want to but when I am using the_excerpt(); then ...
0
votes
2answers
55 views

Exclude uploaded files from appearing in the excerpt()

In a post I have some text and some media attachments and when I use the_excerpt(), it strips all the anchor tags from the attachments and shows just their file names and its causing me problems as ...
0
votes
1answer
122 views

How to disable the_excerpt from one post

I have this code for the_excerpt : function get_excerpt(){ $excerpt = get_the_content(); $excerpt = preg_replace(" (\[.*?\])",'',$excerpt); $excerpt = strip_shortcodes($excerpt); ...
0
votes
1answer
85 views

Two “the_excerpt” questions

In case there's more than one function the exact one is: php the_excerpt(); I want to decrease the character length to X amount and I want to remove the [...] and replace it with an image that users ...
0
votes
2answers
2k views

How to remove “Read on” content in the_excerpt?

I know the_content has the handy dandy $strip_teaser argument that lets you set whether there is "continue reading" text. No such luck for the_excerpt... I would like to just get rid of it. I had ...
0
votes
2answers
949 views

Giving the_excerpt in the place of the_content?

Short and sweet — I wanted to deliver up the excerpt of a post in the place of the_content on certain pages. Naturally, if no excerpt is present one would be generated from the content. I ...
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
2answers
121 views

Excerpt Is Disappeared

My theme automatically assign before of <!--more--> tags, as excerpt.And showing excerpt on home page. Now i want to add Google Adsense after <!-- more --> code. I'm wrote this function ...
0
votes
2answers
94 views

Spacing within the excerpt

I am trying to find out how I can control how an excerpt is displayed using PHP. How do I get it to render the html spacing within the post instead of just showing one big paragraph.Hope that makes ...