Excerpts are short texts or summaries

learn more… | top users | synonyms

0
votes
1answer
22 views

Excerpt all post content Content Same Size without word cutting off

On my category page there are list of 24 posts with title and excerpt content. To display specific lengths of content, I am using substr function. Now the issue is that each post excerpt content are ...
0
votes
1answer
14 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
50 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 ...
0
votes
1answer
21 views

Trimming breaks up markup

Lets say that I have this text in a field: <p>The first expedition to the red planet has ended in disaster!</p> <p>Your ship has crashed in the surface and all your equipment is ...
0
votes
1answer
9 views

Edit the excerpt before it is shown

I'm looking for a way the edit the excerpt before it get's show on the page. The issue is this: We import data (jobs) for a third party provider and the content is divided in sections with each a ...
1
vote
2answers
43 views

excerpt_length not working

I'm trying to build a theme, I want to control the length of the post excerpts by doing something like this in functions.php: function theme_excerpt_length( $length ) { return 45; } add_filter( ...
2
votes
1answer
24 views

Frontend Post Excerpt field mapping

I'm trying to create a form with gravity forms. I need to merge two fields to one Excerpt. I can't give the Excerpt field a merge tag. So I'm trying to use an custom field. My question is now: what ...
1
vote
0answers
30 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?
1
vote
3answers
64 views

How to echo excerpts with wp_list_pages?

I've tried to echo excerpts in wp_list_pages with the code below. It works, but only for one of the child pages. How would I echo the excerpt and title for each child page? <?php $children = ...
0
votes
4answers
39 views

Text under post title on frontpage but don't want it in full post

On the frontpage of a blog I want a piece of text (like an excerpt) under the title but I don't want is showing up in the full post. Any ideas how I would go about this? EDIT: Wasn't precise enough ...
0
votes
0answers
13 views

HTML markup output issue if a custom excerpt is pulled from an advanced custom field

I've used a custom excerpt function to get an excerpt from an advanced custom field. The function inside functions.php looks like that: function custom_field_excerpt($title) { global $post; ...
1
vote
2answers
56 views

Show read more link next to last word

I have this excerpt function <?php function pietergoosen_get_the_content_limit_custom_allowedtags() { // Add custom tags to this string return ...
0
votes
0answers
17 views

Display AIOSEO Description as Product Excerpt in WooCommerce [closed]

I've tried every solution available online that relates to the AIOSEO description being displayed in the theme. I'm essentially wanting to start displaying the AIOSEO description rather than ...
0
votes
1answer
36 views

Thumbnail + Excerpt = loss in word count

My excerpts are shown using this function <?php function get_the_content_limit_custom_allowedtags() { // Add custom tags to this string return ...
0
votes
1answer
59 views

Excerpt keep stripping <a> tags

I have the following function to display my excerpt <?php function pietergoosen_custom_wp_trim_excerpt($text) { global $post; $raw_excerpt = $text; if ( '' == $text ) { $text = ...
0
votes
4answers
52 views

Displaying post excerpt using wpdb query

I'm using a modified version of the code from a question (Get WordPress Posts Grouped by Month) to group my posts by year. Everything is working fine, but I'm having trouble getting the post excerpt ...
0
votes
1answer
47 views

Assign Custom classes to every Excerpt

I have Around 40 Excerpts on my homepage (I am using Gantry Framework) and I want to style each of these Excerpts in a different Manner. i.e Different Backgrounds, Font color For Every Excerpt. So ...
0
votes
1answer
58 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 ...
0
votes
1answer
32 views

Images with excerpt function

I got this great excerpt function that keeps my paragraphs in tact. Works great btw. function pietergoosen_custom_wp_trim_excerpt($text) { global $post; $raw_excerpt = $text; if ( '' == $text ) ...
0
votes
1answer
15 views

content summary of a post disappears If an images added at the beginning of the post. how to solve it?

If I put an image at the beginning of the post my content just disappears at the home page. but when I click read more button it shows full content (single.php) index.php <?php if ...
0
votes
1answer
107 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
0answers
27 views

get_permalink() echoing about us page link only. how to solve this.?

I am trying to build an own theme for my wordpress site. I am using the following code to get a 3 posts on my home page. $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = ...
0
votes
1answer
50 views

Post Excerpt field only showing for default administrator

I am using the following code to add excerpts to certain post types within Wordpress and for some rather odd reason, the excerpt fields only appear for the default administrator account, i.e. admin ...
0
votes
1answer
27 views

making the […] clickable

Im creating my first blog using wordpress. LOCATED HERE. I have created a child theme for twenty twelve. In this child theme I have added a content.php and have copied and pasted the entire parent ...
0
votes
1answer
65 views

the_excerpt() does not work with has_excerpt()?

I'm trying to shorten the excerpt but it does not work. It shows the full excerpt which I write in the post edit! I've added this to the functions.php function custom_excerpt_length( $length ) { ...
0
votes
1answer
83 views

Wordpress excerpt with formatting and allowing selected tags

I went through your answer in post Issue with enabling formatting in excerpts in Wordpress. It works fine and closes tags so that a tag does not spill over to other posts. But I need to disable images ...
0
votes
0answers
30 views

Wordpress Next & Previous post outside the loop

As a (front) designer I'm looking for the following: How can I get the following code working for next/previous posts OUTSIDE the loop? <img src="<?php get_featured_image ?>" /> ...
0
votes
1answer
147 views

How to get excerpt of the recent posts

Right now, i am using code below to show title and its link of recent posts from my custom post category, but for one of my category i want to show excerpt, how can i achieve that. CODE i am using to ...
0
votes
2answers
80 views

Issues with the excerpt (wordcount/HTML/images)

Struggling here with the excerpt and options for it. (NOT looking for a plugin and not extracting from the content, we add seperate excerpt content) We want to have an excerpt limited to a max. ...
1
vote
1answer
80 views

new_excerpt_more link not working properly

My "Read More" button is linking to the current page page instead of the excerpt page it is suppose to be linking to. Here is my function in function.php file: function new_excerpt_more($more) { ...
0
votes
1answer
74 views

Add a minimum word count to Excerpt (and how to force Excerpt as a rule for WyPiekacz)

How do I add a minimum word count to the Excerpt field before the post can be sent for pending review? I want to require content in the Excerpt field. And also, how do I add the Excerpt field as a ...
0
votes
1answer
153 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 ...
3
votes
1answer
73 views

Manual excerpts for pages not working on Search

Image says it all... Page Edit: Search Results: functions.php to enable page excerpts add_post_type_support( 'page', 'excerpt' ); search.php code for displaying excerpt <?php ...
0
votes
2answers
271 views

How to get the excerpt of a page before more tag?

I have many pages in my wp installation. All I want is to be able to display the excerpt of any page, also on any page (before more tag). How do I go about it? I was fetching the content of the ...
1
vote
1answer
279 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
38 views

Category view with contents of [gallery]s shown

SO: I have a bunch of Posts with [gallery]s in them. They are in category "Galleries". I want the category view to show (some||all) of the contents of the galleries in each post. Instead it seems ...
2
votes
1answer
56 views

make a excerpt on data from a meta box?

I have made a custom post type called news that has meta boxes. I would like to print the data from the metabox as a excerpt. How can I do that? This is the code that I use that prints the data : ...
0
votes
0answers
20 views

Generate excerpt (respecting <!--more--> if it's there) “by hand”

I have a post archive page that's loaded by AJAX so I am manually retrieving the posts via WP_Query and then manually displaying $post->post_content, etc. The problem is that I'm not using The ...
0
votes
1answer
78 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( ...
-1
votes
1answer
242 views

Function to shorten string without cutting off last word

This code is working great to shorten a strong of text to the nearest end of a word except that if the string is shorter than the cut length, it cuts off the last word. Can anyone tell me what to ...
0
votes
1answer
103 views

How to stop unwanted splits in excerpts when using shortcodes for sliders or players

Am using this code in functions.php: Issue with enabling formatting in excerpts in Wordpress to allow shortcodes, javascript and formatting in the excerpt - works great, thanks. However, I am also ...
0
votes
1answer
451 views

Limit number of characters in different excerpts

I've been using this little snippet from another answer on here to limit the number of characters that display in the excerpt; add_filter('wp_trim_excerpt', function($text){ $max_length = ...
0
votes
1answer
141 views

Can't change excerpt length and more tag

I tried to change the excerpt length and the more tag the way it is described in the codex: function custom_excerpt_length( $length ) { return 10; } add_filter( 'excerpt_length', ...
0
votes
1answer
79 views

Read more to open external link

I would like to have custom field in post editing area where can be putted the external link. If the link is entered to this field then read more button on homepage would open external link, but if ...
0
votes
1answer
112 views

Bold letters inside excerpt [closed]

I'm currently trying to get some of the words that are inside an excerpt to be bold with "h1" tag but it does not seem to be working. When I checked online, all that I come ac cross was the suggestion ...
2
votes
1answer
53 views

Get the excerpt for a post created by the related author

This has been bugging me for ages and can't quite get it working. I'm using the following code in my functions file to enable me to display posts created by the same author as the current single ...
0
votes
2answers
48 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
0answers
84 views

Extending wordpress search to include excerpts and taxonomies?

Apologies for the lack of code, but I have no idea where to start with this - is it possible to extend Wordpress's search function to include excerpts and (custom) taxonomies as well as the standard ...
8
votes
2answers
672 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
2answers
74 views

stripping tags from excerpt in Wordpress is not working

I am using this snippet <a href='<?php the_permalink() ?>' title='<?php echo strip_tags(the_excerpt()); ?> with which I am intending to remove all ellipses, <p> tags and other ...