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

-1
votes
1answer
569 views

Wpautop stops working after get_the_excerpt

function pre_process_shortcode($content){ global $shortcode_tags, $shortcodes; // Backup current registered shortcodes and clear them all out $orig_shortcode_tags =...
0
votes
0answers
53 views

How to move the the_excerpt's read more link to another div

I intend to show an excerpt of each post on my homepage. I use the_excerpt() in my post.php to show an excerpt of each post with a read more button below it. The problem is that I need to have the ...
0
votes
1answer
58 views

Remove   at the beginning of the_excerpt() with str_replace

I am trying to remove blank spaces at the beginning of the_excerpt();. They are cuased by blanc spaces between two images in the content. I have unsuccessfully tried to get rid of them by using ...
0
votes
1answer
523 views

Custom wp_trim_words() function not trimming right

I have this custom wp_trim_words() function set to give me excerpts of only 20 words, and for the most part, it works fine. Except for some reason, on posts that contain lists, it outputs way more ...
1
vote
3answers
5k views

Customizing get_the_excerpt() to specific length and “Read More” output.

I am costuming a template. There is a list grabbing the introduction from the first 1-2 paragraphs (all the articles from a category). If I set the excerpt to 295 words, sometimes the list grabs ...
0
votes
1answer
24 views

Excerpt of certain page to display on home page

I would like to ask something about Wordpress. For example: When i designing a web page, I want to have a column on homepage that displays an excerpt of the About Page(which is inner page). Is there ...
18
votes
7answers
38k 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 ...
1
vote
2answers
5k 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 ...
0
votes
0answers
42 views

get_the_excerpt adding unwanted links to output html

I can hardly believe this is happening, but I have if ($text == "") { $text = get_the_excerpt(); // $text = "this will be the text"; } When I call echo $text subsequently with the simple ...
0
votes
4answers
72 views

How to filter out shortcode when displaying the_excerpt() in the loop?

I'm using the_excerpt() in my template loop to display post excerpt on the front page. It's currently displaying unwanted shortcode directly on the front page eg. [box]post content[/box] [alert]...
0
votes
2answers
57 views

Certain number of posts with certain excerpt length

Could use some help... using this code to call up a custom number of posts from a certain categorey and only want to display the first 15 characters. However, it is showing the same excerpt on each ...
0
votes
0answers
33 views

Excerpt functions is removing the forward slash on the url

Excerpt functions is removing the forward slash on the url - I am completely lost here I can't find a way to make it work. I am very new on php programming any help would be very appreciated. I am ...
0
votes
0answers
51 views

Remove html content from Auto-Generated Excerpt

I've a website that syndicates content, and each article gets prepended with html content similar to "From Source A:" Wordpress obviously strips the html from that content when auto generating the ...
0
votes
2answers
29 views

Can I use both a custom excerpt and a trimmed excerpt?

For each post, I use the custom excerpt field to write a custom excerpt (180 characters max) for each of my posts, which I use as the meta description of my post for SEO. When I show a list of my ...
2
votes
2answers
36 views

Custom Excerpt is returning 52 characters and not 52 words

I have this custom function that get's the manually entered excerpt and trims it down but the problem I'm having is that it is trimming the characters down to 52 and instead I want it to return the ...
0
votes
3answers
6k views

How to remove “read more” link from custom post type excerpt

Is there a way I can add some kind of pre_get_posts() filter to strip out the "read more" link that appears at the end of the_excerpt() for only 1 certain custom post type that I specify? If so, can ...
-1
votes
2answers
28 views

Implementing a blog excerpt in custom theme

I'm trying to make my blog posts show an excerpt but can't seem to do it manually. My blog site is here. I've gotten this snippet from the wordpress.org site <?php the_excerpt(); ?> and it ...
2
votes
3answers
119 views

Trim first 2 words of the exceprt

I am currently pulling in the post excerpt however there are 2 words at the start of it that I would rather not have in this particular place as there is a title already. I have used wp_trim ...
-1
votes
1answer
28 views

Get the excerpt of post_content

Hi guys can you explain me how to get a excerpt length of 15 for the post_content in my code: <?php $args = array( 'numberposts' => '2', 'tax_query' => array( array( '...
-2
votes
1answer
28 views

Return excerpt on Search

Wondering how to return only excerpts on a search. function get_the_excerpt( $deprecated = '' ) { if ( !empty( $deprecated ) ) _deprecated_argument( __FUNCTION__, '2.3' ); $post = ...
1
vote
2answers
122 views

Change excerpt length of first post

I have created a custom excerpt length in my functions.php, I would like to extend this function to increase the excerpt length of the first post in a loop. My function at the moment: /* Change ...
0
votes
0answers
334 views

Excerpts and Custom Post Types

I have a declared a custom post type using the Types plugin. When using a tag to display a page of these custom post types the excerpt shown is the full content of each post with formatting stripped....
0
votes
2answers
59 views

How to read out the excerpt length (for if-condition)

I'm trying to do is the following. If the excerpt length is shorter than 30 charakters, than do.. <?php if ( get_the_excerpt() <= 30 AND has_post_thumbnail() ) : ?> <div></div>...
0
votes
2answers
57 views

get_the_excerpt without images

i'm using this function in my Wordpress index: <?php echo get_the_excerpt(); ?> But if the article contains an image in the first 50 words, I get the link of the image in this form: ...
1
vote
1answer
121 views

Excerpt_length nor the_excerpt not working correctly

What I'm using- WAMP, clean install of WordPress 4.3.1(No plugins) and starter theme - Underscore. What I'm trying to achieve- I want to have blog post, that shows only the excerpt, so I've modified ...
0
votes
0answers
77 views

apply_filters to remove some text within excerpt

I created this code below to remove all image captions in an excerpt, but it doesn't work. The image caption text is within the <em></em> HTML tags and I created this regex to remove the &...
4
votes
4answers
4k views

the_excerpt and shortcodes

I'm using the_excerpt on my index page. I'm also using a dropcap shortcode at the beginning of each of my posts. On the index page the posts will not display the letter with the dropcap shortcode ...
0
votes
0answers
70 views

How Can the_post Be Hooked Like the_content and the_excerpt?

My plugin currently hooks properly with the_content and the_excerpt, but when I try to hook the_post, I get the error "Catchable fatal error: Object of class WP_Post could not be converted to string......
0
votes
1answer
51 views

Update Plugin Without Overwriting Custom Settings

My plugin uses the code below that has uid="x" in it that requires the user to edit the plugin and set "x" to their user id, such as uid="420971". Whenever I release an update to the plugin and the ...
2
votes
1answer
72 views

How Can A Plugin Hook Itself To the End of Every Excerpt?

So far, I've been able to only consistently hook the_content, appending my plugin at the end. How can I test if the displayed article is not the_content, but an excerpt, and hook my plugin after every ...
0
votes
1answer
127 views

How to properly show the Excerpt only if it exists?

I have the following two functions in my theme: function content($limit) { global $post; $content = explode(' ', get_the_content(), $limit); if (count($content)>=$limit) { ...
0
votes
1answer
298 views

How to achieve two different excerpt types on one WordPress site?

Working on a client site that displays a blog excerpt on the blog page (which shows 5 posts per page) and the main home page (which shows the latest 3 blog posts). The trouble is I want different ...
0
votes
1answer
95 views

Display inner pages like posts.[Like how post excerpt works]

This question may be stupid. But, i'm just wondering if there is a possibly way to display page as excerpt like how post excerpt works. You may not be able to understand what am i trying to ask till ...
0
votes
0answers
39 views

Delete/remove post excerpts?

I have post excerpts in my posts generated by some plugin. I do not use them. Is there any function which will delete them on post publish, or even better remove that feature?
0
votes
1answer
93 views

How do I override the_excerpt so that it will display full content?

I am creating a plugin. Many themes display excerpt such as when is_search() is 1. I want WordPress to display full content no matter what. How would I do so? Should I use add_filter ('the_excerpt',...
0
votes
1answer
31 views

Post class only applying to first excerpt; why?

I have a page with three excerpts. Only the first excerpt is being given the post class, not the second or third. I presume something is wrong in my PHP: <table width="100%" border="0" ...
0
votes
1answer
130 views

Easy way to show excerpts of specific posts on a page

Suppose I have 3 posts on my wordpress site titled: Test_post_1 with tag test_tag Test_post_2 with no tag Test_post_3 with tag test_tag Suppose now that I have one page titled page_1. On that page ...
5
votes
4answers
5k 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 ...
0
votes
1answer
29 views

My post excerpt does not work

I'm using the excerpt for post but when I click on the read more link it does not show me all post paragraph and it show me only the paragraph excerpted and this the code line index.php <?php if ( ...
0
votes
0answers
104 views

Can't change excerpt length

I'm using a custom child theme on top of a commercial parent theme. For some reason, the_excerpt() display much less than 55 words as it should (can't find any function related to the_excerpt() ...
0
votes
2answers
124 views

Manual excerpt being ignored on custom post type

I've set up some custom post types with Pods, but can't seem to get it to display my manual excerpt. It's working fine for my normal posts. I've tried displaying it with echo get_the_excerpt() and ...
0
votes
1answer
33 views

erase post excerpt limitation [×]

i have a custom site in homepage have problem of post excerpt with max 35 word, now i want eliminate this limitation, after search in varius file the limitation and after individuate i have changed ...
0
votes
1answer
203 views

Replacing the ellipsis with three dots

I'm having an issue with the ellipsis generated by the_excerpt(). I'm using a custom font which doesn't have the ellipsis character, therefore I just have a random character instead of the usual ... ...
0
votes
1answer
234 views

The excerpt suffix won't go away

I want to show the post content until the more tag, or if there's no more tag than just first n words. Something really basic, right? Obviously I need to use get_the_excerpt function. But the problem ...
1
vote
1answer
398 views

How to Display a Single Post Excerpt

Is it possible to show the excerpt for a known and single post (on the Home Page) while in the loop? I tried each of these and none of them work: <?php echo the_excerpt('10'); ?> <?php echo ...
0
votes
3answers
37 views

Apply wordpress filter checking category

I am trying to apply wordpress filter hook get_the_expert. My intention is to apply filter only when the category slug is "MY-CATEGORY-SLUG". How can I check the category slug inside the filter hook ...
1
vote
1answer
124 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, ...
0
votes
1answer
904 views

Custom excerpt showing first paragraph (with HTML formatting)

Can somebody help me how to show the full first paragraph of the post, including all used tags (no stripping)? My code: function new_excerpt_more() { global $post; return '…</p><div ...
0
votes
1answer
39 views

Remove “[ ]” from excerpt in highlight search term

I am using highlight search terms in my wordpress website. In my search result, the last character of the excerpt is as below: This is the excerpt.[...] I have the code in my functions.php which ...
1
vote
1answer
374 views

Only showing the_date and the_excerpt for first entry in get_posts

this code below shows the titles and links for 5 posts in get_posts no problem but only displays the date and excerpt for first post... any help please? <?php $args = array( 'posts_per_page' =&...