Excerpts are short texts or summaries

learn more… | top users | synonyms

0
votes
2answers
980 views

Create custom links for excerpts with php dynamically

Good Day I am using excerpts in my wordpress theme. Now in wordpress's documentation, they say wordpress does not automatically add links for the excerpts, you have to manually add them like this: ...
1
vote
1answer
26 views

How to have a “clean” post content, for excerpt and social networks sharing

Sometimes I start my blog posts by : This is a guest post.... This is a sponsored post.... [download]This is a download for the post[download] [youtube]this is a video that I put in the begenning[...
0
votes
1answer
535 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 ...
3
votes
1answer
85 views

Exclude filter on front page

I am using this code in functions.php to append a button for link to a post. function new_excerpt_more($more) { global $post; return '<a class="excerpt-readmore" href="'. get_permalink($post-&...
2
votes
1answer
771 views

Allowing the SoundCloud player to appear in a post excerpt

I am setting up a website for my music, in conjunction with my SoundCloud account. I plan to post the links to my soundcloud player as blog posts, but I can't figure out how to make the blog excerpts ...
0
votes
1answer
30 views

Hide specific content from excerpts

I am using Inked Blog to generate lists of articles on a page. However, I need to remove a specific headline (with the class sow-headline-container) from the excerpts. This is a bit of a struggle, but ...
0
votes
1answer
380 views

how to reset metabox excerpt to open

For some reason the excerpt box on the new posts page (post-new.php) is always closed. I can alter that with firebug, but it should be open anyway. There is a "closed" class being added by someone ...
9
votes
4answers
2k views

Move excerpt meta box to above content editor

I found a WordPress hook called "edit_form_after_title" to add a text box after the title. How can I use this hook to display the excerpt after the title while creating a new post?
0
votes
2answers
42 views

Running Filter or Shortcode Before Query Prevents Excerpt from Showing

I've been wrestling with some code cobbled together for a function I found, first published circa 2009 and my inexperience with PHP has me at a loss. The function is designed to count episodes in a ...
0
votes
1answer
45 views

Problem with viewing single page correctly. (taken half way down the page on click through)

I have a strange situation occurring with a website that I am currently developing. On the main articles page at http://wptest.lancscps.co.uk/articles/ when the user clicks on the continue reading ...
0
votes
1answer
618 views

Manual excerpt length on recent posts slider

I need to change the character/word limit of manual excerpts which will be displayed on recent posts slider. I think it's 55 characters right now without counting spaces and punctuation marks. Am i ...
0
votes
1answer
46 views

Need help removing […] after excerpt

My website is watersedgeofshelton.com and i need help removing the [...] after the excerpts on the blog posts (under activities, marinas and restaurants" I read that I had to add this code to my ...
0
votes
3answers
3k views

Remove more or […] text from short post

I use a theme that have a character limit for shortpost and show [...] at the end of character limit. I want to remove this, so I search for the_excerpt(); and replace with the_content(); The ...
3
votes
1answer
55 views

Stop strip_shortcodes() stripping content inside shortcodes

I have this shortcode: add_shortcode('refer', function($atts, $text) { $defaults = ['link' => '', 'nofollow' => true]; $atts = shortcode_atts($defaults, $atts, 'refer' ); $...
0
votes
1answer
75 views

Remove &nbsp; 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 ...
20
votes
9answers
57k views

GET the excerpt by ID

Why is it that one cannot get the excerpt by ID like with the title and most other elements. eg. get_the_excerpt(ID). I know how to use it with the $post->post_excerpt function but that does not ...
0
votes
1answer
64 views

Merging two excerpt functions to work with conditions

I have two functions that affect the_excerpt: // Grab First Paragraph Of Text And Ignore Images For Excerpt function awesome_excerpt($text, $raw_excerpt) { if( ! $raw_excerpt ) { ...
18
votes
7answers
39k 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
0answers
15 views

Make excerpts get its data from the post content

I'm using a plugin to publish my posts and pages to social media automatically. The plugin uses the excerpt as a description for each post/page. So I want the excerpt to get the first 140 characters ...
0
votes
0answers
43 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
1answer
102 views

making the […] clickable

I have created a child theme for twenty twelve. In this child theme I have added a content.php file and have copied and pasted the entire parent content.php and pasted it in to the child theme ...
0
votes
1answer
39 views

Shortcodes in RSS excerpts

I am developing a plugin that uses shortcodes. I wanted to enable users to use shortcodes in excerpts, so I added the line add_filter('the_excerpt', 'do_shortcode'); which worked fine.However, in ...
0
votes
2answers
62 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
1answer
22 views

How to get only manual excerpts?

I have a plugin I'm modifying in which I need to return the manual excerpt if it exists, and if not, nothing. How would I go about that? Here's my code so far: $excerpts = sprintf( ...
0
votes
1answer
39 views

Pull in excerpt with shortcode

I am working with a plugin that provides a shortcode with only a couple of parameters. I'm using [list-shows] shortcode. I would like to also pull in an excerpt of the content. I was able to add in ...
0
votes
0answers
36 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
5answers
126 views

How to show only manual / custom excerpts?

I know how to add the more-link in the post editor to show the excerpt of post instead of the full post. In this method excerpts created automatically. If I want to manually enter the excerpt I have ...
0
votes
0answers
21 views

A simple way to unfilter the closing h2 Tag in the excerpt

normaly the Wordpress Excerpt is beeing filtered. For some auto correction inside a Plugin i would need to know where the h2 tag ends, and finally to set a dot on its place with a preg replace. I ...
0
votes
0answers
54 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
1answer
25 views

Excerpt preview

Is there a possibility to preview a manually created excerpt? I would like to add a picture or a link to my post's excerpt, but I don't want to test my manual excerpt on my live wordpress. Any ...
0
votes
2answers
36 views

Problem with site's search results “Read More” link?

I'm hoping someone will be able to help me with this issue. I noticed today that when I search certain serch terms in my Wordpress site's search box the link is messed up (shown in the image below ...
-1
votes
2answers
2k views

Creating a press page for our project

Over time our project got some good press: press releases, interviews, media appearances Now I want to create a "press page" (something like this). Requirements: is easy to update - everyone can ...
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 ...
0
votes
1answer
59 views

How to get the excerpt for is_home() outside of the loop isn't working

I'm wanting to get my excerpts outside the loop and I learned how for everything but the blog page. After researching this topic I was able to produce two Q&As: Get excerpt using ...
1
vote
2answers
48 views

Different excerpt styles per category, but chronological

I want to have different sized previews for different kinds of work I've done. Say 100x100px for regular stuff, but 200x200px for a bigger project. I figure I can use category to sort, and I know how ...
1
vote
2answers
40 views

Append Text to $post->post_excerpt

I'm trying to add some text after a product description in WooCommerce which uses the $post->post_excerpt. Currently I'm using the following code: add_action( 'woocommerce_single_product_summary',...
-1
votes
1answer
31 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( '...
0
votes
2answers
63 views

the_excerpt() doesn't return the Excerpt field content

The problem I'm having is that the_excerpt() isn't returning the content from the post's "Excerpt" field. Instead, it's returning the first 55 words of the post, as though the "Excerpt" field is empty....
-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 = ...
9
votes
2answers
3k views

How to end the excerpt with a sentence rather than a word?

Here is the excerpt of the post on my home page. I want to end the excerpt with a sentence. In this case it is ' opportunities. '. I know how to modify the length but it won't do what i want. Here ...
0
votes
1answer
43 views

Adding html banner to posts

I'm writing a plugin that adds a banner to the top of all blog posts. I'm using the_content filter and just pre-pending some html to it. When doing this, the html isn't shown in the excerpt, but I ...
4
votes
1answer
1k views

Mandatory excerpt for custom post type

This is proving to be a challenge. I'm trying to make the excerpt a required field, but only when editing/saving a post in a custom post type. The following code makes the excerpt a required field ...
0
votes
2answers
62 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
108 views

Excerpts are not displayed by a shortcode on category pages

A 3rd party plugin that I use adds a shortcode that displays a list of adverts (CPT posts). The shortcode function includes (with an include statement) a template - the list.php file, that displays a ...
0
votes
0answers
65 views

How to add a new line to an excerpt?

I am trying all day to add a new line to excerpts that I am using with my blog but I have not managed to do it yet! I am using Canvas theme and Visual Composer. I am trying to add manually these ...
2
votes
1answer
5k views

How can I create a “Read More” link using the_excerpt() on a static front page?

I'm working on a website that uses a static front page. It also shows the single most recent blog post. This was achieved by creating a page and using a custom page template. Sometimes, the blog post ...
1
vote
1answer
134 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
38 views

I can get the permalink or the excerpt to work correctly, but not both

I'm calling the following code from within a filter hook. (I'm using the_ rather than get_the for bugsquashing clarity.) function test_function($output, $format, $link, $post, $adjacent) { //...
21
votes
1answer
46k views

Allow HTML in excerpt

Here is my excerpt code. // Generate custom excerpt length function wpbx_excerpt_length($length) { return 300; } add_filter('excerpt_length', 'wpbx_excerpt_length'); How do I allow html like &...