Excerpts are short texts or summaries

learn more… | top users | synonyms

-3
votes
0answers
18 views

Problem in excerpt [on hold]

Recently, I am converting an html website to wordpress. In my index.php i want to display excerpt of posts. Its working fine with html but while converting to wp theme its not showing result as ...
0
votes
0answers
17 views

Protected Excerpt Text

On this page of the WordPress Codex it says: Protected Excerpt Text The default Excerpt of a password-protected post is: "There is no excerpt because this is a protected post." This code ...
0
votes
0answers
23 views

Excerpt content

I want to display the title with content in result in search engine using excerpt. I see an answer for excerpt, See this, but I'm confuse where do I place this code... in function or ...
0
votes
1answer
23 views

Make the title and […] clickable in result search

I have search engine in my site. But when I try to search something, like "loan", the title is not clickable and the other contents are not displaying How to display the content and the title make as ...
0
votes
1answer
22 views

How can I show post excerpts on the tags page?

I want to see excerpts on my tags page (e.g., http://domain.com/wp/?tag=psychotherapy), rather than the full length post. How do I do this? I see the following in the tags.php page for my theme: ...
0
votes
1answer
25 views

Check if excerpt is empty at loop-portfolio

I want to check if excerpt is not empty, then echo the excerpt link, if not the echo permalink, like this: if(the_excerpt()!='') echo the_excerpt(); else echo get_permalink() but how can I check if ...
0
votes
0answers
25 views

is_page_template() doesn't work with excerpt_length filter

I am tring to set a different excerpt lenght for the pages that use an specific page templates using excerpt_length filter. This is the code: add_filter( 'excerpt_length', 'nmd_excerpt_length', 999 ...
0
votes
1answer
55 views

run shortcode in excerpt of single custom post type

Hi because of the way my theme is set up, I need to run a shortcode inside the excerpt of a custom post type (services). This is the code I have so far... function ...
0
votes
0answers
24 views

Keep shortcode in shortpost contents excerpt

I'm really confused , when I use some default theme like twentyfourteen, shortcodes show well in shortpost, but when I use theme that someone design for me , in shortpost I get shortcodes as text !! ...
0
votes
2answers
60 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 ...
0
votes
1answer
34 views

shortcode issue in the_excerpt

I had this custom shortcode working but it seems to have stopped. I had the code running through another shortcode that ran the loop for category posts. I have since improved the code so that it works ...
0
votes
2answers
49 views

Empty excerpt using wp_get_recent_posts

I have this simple shortcode to display the last posts with it's title and except: add_shortcode('latest3', function(){ $recent_posts = wp_get_recent_posts( array( ...
0
votes
1answer
40 views

How to show an entire post content and not also the excerpt?

I am pretty new in WordPress theme development and I have the following problem showing posts. You can easily understand what I mean opening this link: ...
0
votes
3answers
204 views

How to get post or page excerpt using post_excerpt

I am using the following foreach loop: $pages = get_pages(array ('post_type' => 'page','sort_column' => 'menu_order',)); foreach ($pages as $page) { $apage = $page->post_name; ...
-2
votes
1answer
36 views

Export Posts in excel [closed]

How can i export post only with this data in excel :- Post title - Post URL - Author - publish Date Thanx
0
votes
0answers
193 views

wp_trim_words is trimming by character instead of by words

I'm using Wordpress 3.9.2, and having trouble with the wp_trim_words function. It seems to be cutting the string down to X characters instead of X words. Example Put the following in a template ...
0
votes
1answer
36 views

Excerpt filter is adding '</p>' in incorrect place

I'm using the following code from this question in order to limit the excerpt length to 2 paragraphs. if ( ! function_exists( 'wpse0001_custom_wp_trim_excerpt' ) ) : function ...
0
votes
0answers
35 views

Strip 'p' tags in wp_trim_excerpt()

When I have a lot of paragraphs in a post and trying to display an excerpt in blockquote, all <p> tags are stripped, and whole 55 words are in one <p> tag. <blockquote cite="URL"> ...
0
votes
1answer
32 views

Adding Read More to Custom excerpts

I've added the following code to my functions.php: function new_excerpt_more($more) { global $post; return '<strong><a class="moretag" href="'. get_permalink($post->ID) . ...
0
votes
1answer
59 views

Why the_excerpt() function returns excerpt on the Home page and trimmed content in sidebar?

I have this code to display 4 posts of type "testimonial" on the Home page: <?php $custom_posts = get_posts([ 'numberposts' => 4, 'post_type' => ...
0
votes
1answer
26 views

Return only content in excerpt field in loop

I am sure this has been asked before, but I can't seem to find the answer, although it seems simple enough. I have built a custom theme based on another person's design. He uses both the excerpt and ...
0
votes
0answers
17 views

2 posts same excerpt?

I'm facing the following problem: I'm outputting 2 posts with different titles, dates, permalinks but the excerpt are both the same. <?php $query = new WP_Query( array( 'post_type' ...
0
votes
2answers
114 views

How to show only the date, the title and a little “summary” of my WordPress post in my custom theme?

I am pretty new in WordPress theme development and I have the following doubt about how show posts into a page. I have this page belonging to an old custom legacy blog that I am build again using ...
-2
votes
1answer
495 views

Modify Twenty Fourteen Home Page Content Limit & Add Read More Link

I've install the new Twenty Fourteen theme for WordPress. I don't know how add summary text of posts on my front page. All old tutorials like this does not work with new theme. Any suggestions on ...
0
votes
1answer
160 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 ...
0
votes
1answer
79 views

get video from content

I have a post with YouTube video in it. The content is inside $content. Currently I am doing the_content() and this displays full content on my page. The page contains the list of all videos. The ...
0
votes
0answers
36 views

Archive Page Isn't Showing Article Excerpts

I'm using the _tk theme (bootstrap + _s) and in the reading form I've set the Posts page to a static page because I'm using a static front page. I've also set it to show a summary for each article. ...
0
votes
0answers
9 views

Woothemes Canvas - Variable Excerpt Length [duplicate]

I'm working with WooThemes Canvas - and using a child theme, and I'd like two different post excerpt lengths on the home page. The Featured Post is to have a longer excerpt, and the rest on the grid ...
0
votes
1answer
38 views

image class removed in excerpt

I have inline images in my post content that have classes. the classes are available as I go to single page like this: <img src="the_cource.jpg" class="myclass"> , but are removed as I look ...
0
votes
0answers
479 views

Custom post type change excerpt more and excerpt length

I have written a some code to get custom excerpt_length and excerpt_more. The excerpt_length is working for both custom post type and general post. But I don't know why excerpt_more is not working for ...
0
votes
0answers
101 views

Custom search results page not showing excerpt

I have a custom content-searchresults.php page. However for some reason its not showing the excerpt, but other amends I make this on this are pulled through so it is using this template. Below is my ...
0
votes
1answer
54 views

How to remove excerpt white spaces

This is my code in wordpress archive: mb_substr(get_the_excerpt(), 0, 236); This echos: NGÀY 1: HÀ NỘI – ĐÀ NẴNG Chiều: khởi hành In view code NGÀY 1: HÀ NỘI – ĐÀ NẴNG ...
0
votes
1answer
35 views

Excerpt displays the current page excerpt not one being pulled

Just as the title says this code is not pulling the excerpt from $recent like it should be, instead it is pulling it from the current page. <?php $args = array( 'post_status' => 'pending'); ...
0
votes
0answers
41 views

Excerpt for each post type and for is_front_page

i try to adjust the excerpt for each post type and especially for the front page. function isacustom_excerpt_length($length) { global $post; if (is_front_page() || is_home()){ if ...
0
votes
1answer
187 views

get_the_excerpt() not working in plugin loop

I am new in WordPress plugin development. I am developing a simple WordPress plugin in which get_the_excerpt() not working in the loop. Other tags such as get_the_title(), get_the_permalink() even ...
-1
votes
1answer
252 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
196 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 ...
6
votes
1answer
6k 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
48 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
15 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
544 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
68 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 ...
2
votes
3answers
265 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
145 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
65 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
26 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
106 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
1answer
69 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
214 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
162 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 ...