Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [excerpt]

Excerpts are short texts or summaries

1
vote
2answers
10 views

Shortcodes in excerpts returning empty string

I got this code: function ntt_movie_shortcode($atts, $content = null) { return 'TEST'; } add_shortcode('ntt_movie', 'ntt_movie_shortcode'); The shortcode works perfectly on a single page, but on ...
2
votes
3answers
89 views

Generate a excerpt from an ACF-wysiwyg-field

I have an ACF-field, that gives an output like this: <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> <p><img class="alignnone size-large wp-image-48" src="http://...
0
votes
0answers
19 views

How to add excerpt and read more button to category archive page

I am finding it hard to add excerpt and read more button to my category archive page
0
votes
1answer
18 views

How to custom excerpt?

I wanted to make the excerpt only display second or third paragraph. I need to know. How can I make the_excerpt() only display second or third paragraph and limit the length of the except.
1
vote
0answers
40 views

Gutenberg is Adding Additional HTML Tags When Grabbing the Excerpt

I am running into an issue with Gutenberg where I want to display the excerpt of a post, even when the excerpt field isn't filled in. Usually the functionality of WordPress is when the excerpt is ...
0
votes
0answers
16 views

How can I make the excerpt for a post be the featured image?

I am migrating a blog from blogger (ex blogspot) to wordpress and am looking to take each post's featured image and show it in its excerpt. So, how can I set an excerpt for a post to show the post's ...
0
votes
1answer
32 views

Excerpts not showing

does anybody see anything wrong with the code? It's not showing the excerpts. It it is supposed to show the first 55 words of the content. The site is this one. And this is the code: <article id=...
0
votes
1answer
21 views

custom excerpt is not being shown

I am trying to show custom excerpt using the_excerpt(). the full code is as follows: <div id="content"> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts(...
0
votes
0answers
21 views

Having trouble using wp_update_post

I am trying to create an action that will place the contents of a meta tag into the excerpt field, but I can't seem to get it right. The action is the publish event of a frontend submit plugin. When ...
0
votes
0answers
15 views

Post excerpt based on condition

I want to modify the excerpt of a post automatically if a video has been inserted in a post either embedded or uploaded through media. So like the posts has a video on it, an excerpt is added like, "...
0
votes
1answer
46 views

Split the_content into two parts

I want to split the content of a post into two parts. The First part is in an <strong>-tag, it is like a excerpt and in the second part i want to display the rest of the content. But I don‘t ...
1
vote
1answer
41 views

How to display post content instead of excerpt

I am using a plugin, and to get around something I need to add some text to the excerpt field on my posts, but I don't want to display the excerpt field data on the front end, but rather the post ...
0
votes
0answers
23 views

Excerpt option unavailable in Screen Options no matter what I do

Excerpt option is unavailable in Screen Options even after adding php function to the functions.php file. add_post_type_support( 'page', 'excerpt' ); (Yes, I added it in the proper place on the ...
-1
votes
1answer
17 views

How to show excerpt field

My excerpt field has vanished on the back-end of WordPress posts. Even when ticked in "screen options" it does not display. There's nothing in my functions.php that would override it... So is there ...
1
vote
1answer
35 views

Custom get_the_excerpt() only works on first post

I use a custom get_the_excerpt function in my theme. It works perfectly for the first post in the loop, but the other posts are using the standard excerpt function. I do not understand why? The ...
0
votes
0answers
11 views

Hide excerpt note [duplicate]

Under the WordPress excerpt meta box is a note: Excerpts are optional hand-crafted summaries of your content that can be used in your theme. Learn more about manual excerpts. Is it possible to ...
0
votes
0answers
23 views

How to remove youtube links on the wordpress post excerpts

currently the word press excerpt shows a YouTube link if the post has a YouTube video inside. I saw this code: function remove_links($text) { if ('' == $text ) { $pattern = '~http:/...
0
votes
0answers
14 views

Get Manual and Automatic Excerpts Separated

I would like to create an entry and show the automatic excerpts in the archive.php but in my custom php (category-23.php) show the manual excerpt. It is possible to do that?
0
votes
1answer
27 views

Enable HTML Tags in Wordpress Post excerpt

i did enyone know how i can enable HTML for the Post excerpt thet i can make some parts of thet big? Sorry for my Bad english and thanks for awnser :)
0
votes
1answer
22 views

the_excerpt displaying code inside style tag

I created a custom visual composer element where I included a style tag on it to use the chosen color to create hover effect. And this code is now displaying in the the_excerpt in the search result ...
0
votes
1answer
23 views

“read more” tag for excerpt() won't show full content

i'm working on a blog page.i'm trying to use excerpt() function to add "read more" tag to get to the full content page and the comment section. there is a div like this <div class="post-excerpt"&...
0
votes
1answer
30 views

How to strip header tags & shortcodes from the_excerpt()

I'm trying to learn how to strip "header tags" & "shortcodes" from the_excerpt()... Searched for an answer to no avail so thought Id ask the community. Thanks for your time Best Shaun
0
votes
1answer
30 views

How to replace get_the_excerpt with first N words of post article while stripping html

I'm trying to add Twitter Card functionality to a Wordpress blog so that whenever someone posts a link to an article on Twitter, the card displays. Here is the code I put in functions.php of my theme ...
0
votes
0answers
46 views

Keep excerpt from stripping URLs and enable autoembed for youtube ONLY?

Is there an easy way to drop something into functions? I tried removing all filters from the_excerpt and the URLs are still being stripped (not links, but just straight URLs). I've scoured the ...
1
vote
0answers
97 views

excerpt() shows different result between remote and localhost(development environment)

Something strange when I am developing my own theme. Not sure what have I changed recently, but the the_excerpt() or get_the_excerpt() started to show full text on my localhost dev environment, while ...
0
votes
0answers
145 views

Post using the_content() and the_excerpt()

I can't wrap my head around this one. I've tried so many different ways. I'm new to wordpress, so please excuse my noobie question! I'm trying to get the following loop below to display all my post ...
0
votes
1answer
88 views

the_excerpt filter doesn't work as expected

I'm having an issue related to the_excerpt filter. For some reason, if the post being displayed in a posts listing contains only shortcodes, it will execute those shortcodes no matter what. What I ...
-1
votes
1answer
116 views

How to make WordPress orderby work with post_excerpt column?

I can use WordPress in-built orderby to sort playlist by any column except post_excerpt echo wp_playlist_shortcode( array( 'ids' => '7,8,9', '...
0
votes
1answer
54 views

Disable WYSIWYG rich text editor only on post excerpt

I am pulling info from the excerpt of a custom post type into a 3rd party application. I need to be able to add line breaks and for them to be saved in the database. If my user switches to "visual" ...
0
votes
0answers
227 views

Custom excerpt length filter doesn't work

So I'm trying to change the standard post excerpt length. Every single blog post on the web tells me to do it with a filter like this: add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); ...
0
votes
0answers
25 views

Excerpt being limited too early

I grabbed the code from here I have this in my post right now: "Test sentence for excerpt purposes. Link: https://www.ankitdesigns.com/demo/bysc/competitive/ontario-player-development-league/" ...
0
votes
1answer
210 views

How to change value of variable in theme file with functions.php Wordpress?

I want to change values of the variable in my theme. I don't want to edit in this file because after update theme, it will be lost. So, I want to update values of this variable in functions.php. In ...
1
vote
2answers
89 views

Can I change a control's transport in Customizer depending on the previewed page?

I have a theme with an option for setting the excerpt length for generated excerpts. Is there a way in the Customizer of conditionally changing the transport mechanism, depending on whether the ...
0
votes
1answer
100 views

the_excerpt is displaying excerpts of every post

I have a simple page for outputting all posts (index. php) Unfortunately the excerpt shows me the excerpts of all entries. what's the mistake? <?php while (have_posts()) : ...
1
vote
1answer
219 views

Add “Excerpt” in “Quick edit”

I have many posts in which I want to edit the excerpt. But instead of having to got to the edit page, I would want to do it with the "Quick Edit" feature. How can I add the excerpt in the Quick Edit ...
2
votes
1answer
39 views

Allow latex in wordpress excerpt

I've found some code below which allows you to write HTML in a WordPress excerpt. Allow HTML in excerpt I would like to write LaTeX in the excerpt as well (using Beautiful Maths from Jetpack). ...
-1
votes
1answer
34 views

Post content not showing

I have this code that works perfect: <?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query('posts_per_page=5' . '&paged='.$paged); while ($wp_query->...
0
votes
3answers
707 views

Getting first 20 words without excerpt

I'm working on my own custom theme (first custom WP work so I'm a real beginner) and need help in listing the first 20 words of a list of recent posts. I managed to solve this with manual? excerpt ...
1
vote
1answer
413 views

Custom Post excerpt not working correctly

What I want I need to display different types of excerpts. Some items need to have one type of "read more" button, others need to have another type of it. The same goes to the length of the excerpts. ...
-2
votes
1answer
35 views

Show full post only to loged-in users

Very simple question: Is it possible to show post-excerpts by default and show the full post only to logged-in users? I want to decide on a per-post-basis which posts are fully visible to everybody ...
0
votes
1answer
27 views

Excerpts on category page

Is there an easy way to get a specific category page to display excerpts with x amount of words then have a read more link to link to the full post? I've tried the advanced excerpts plugin which does ...
0
votes
1answer
17 views

How to retrieve Post Excerpt from a different site in the Network

Is it possible to get the post excerpt from a different site in my Multisite Network?
0
votes
1answer
383 views

Use get_the_excerpt is returning nothing outside of loop

I am trying to get the excerpt of a blog post using the get_the_excerpt and it just returns blank every time and i cant work out what i am doing wrong. Here it was i got: Template: <div class="...
0
votes
1answer
220 views

the_excerpt producing empty output

I am using WordPress 4.9 and in my content.php file I have the following code <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php do_action( '...
1
vote
3answers
236 views

How to find a post id using the post_excerpt?

I know how to find the post_excerpt using the post ID, but is it possible to find a post ID using an excerpt? Every time I search for this, all that comes up is how to find the post_excerpt from the ...
0
votes
1answer
166 views

Cutting off excerpt with first sentence

I'm trying to end my excerpts with the first sentence. I had attempted the solutions I found on this website, including each function + add_filter from these posts: How to end the excerpt with a ...
0
votes
1answer
70 views

Get Post's Excerpt Without the Wrapping <p> tags and the Read More link

I want to get the post's excerpt TEXT ONLY. Currently, I'm using get_the_excerpt(), but it returns a string in the following format: <p>LOREM IPSUM!&hellip; <a href="http://localhost/...
0
votes
1answer
25 views

Excerpts not showing on main page

I made my first wordpress child theme, but it's not working correctly. This is my custom-functions.php coding: // custom excerpt length function themify_custom_excerpt_length( $length ) { return ...
1
vote
1answer
553 views

Display custom fields on post excerpt or teaser

I have a custom Post Type I've created, and it also has some custom fields I created. For full disclosure, I used the Pods framework to do this. The Post Type can be tagged using a custom taxonomy. ...
0
votes
1answer
238 views

How to Remove Checkbox for Excerpt Under Screen Options

In relation to How to Display Post Excerpts in Admin by Default?, how would we go about removing the checkbox for Excerpt under screen options entirely for a complete solution?