Stack Exchange Network

Stack Exchange network consists of 175 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

0
votes
0answers
16 views

Add default custom excerpt that executes a shortcode

I'm trying to get a default custom excerpt for posts. I've got a shortcode that executes if it is manually entered into the WordPress post editor excerpt meta box. To do this functions.php has ...
-2
votes
1answer
35 views

Need to show post summary in sidebar

I need to show a summary of each post in the sidebar. Is there any way to do this?
1
vote
2answers
37 views

How to change / delete product short description in Woocommerce

How to change / delete product short description in Woocommerce I use $short_desc = $post->post_excerpt; to read the property but I cant change it with wp_set_object_terms($post->ID, $post-&...
0
votes
1answer
31 views

Cannot figure out how to add a read more link to a manual excerpt. Please help

Nothing I do works. I am using a manual excerpt and when I paste this code into functions.php the words read more appear but they are not a link. Why is this? add_filter( 'wp_trim_excerpt', '...
0
votes
0answers
23 views

Force user to write excerpt before saving post? [duplicate]

Is it possible, in functions.php, to force users by default to write an excerpt before they can save a post? And ideally, would it be possible to make this mandatory in only certain post categories?
0
votes
1answer
20 views

Retrieving post excerpt as a shortcode

How do I register a shortcode to add the manual post excerpt anywhere within the same post? Does this shortcode already exist in WP? Thanks!
0
votes
0answers
26 views

Customize Search Results Body Content

Is there a way to customize the search results page to show the original text formatting in the post_text_inner class as its seen on the original post or portfolio page instead of showing everything ...
0
votes
1answer
24 views

Appending „read more” to the excerpt conditionally

I wonder if anyone knows how to add an if to this function. I need the read more to only be added to the the_excerpt when the category is 429 function mywiki_trim_excerpt($mywiki_text) { $text = ...
0
votes
1answer
19 views

PHP Code in excerpt?

Is there a way I can add <a href="<?php the_permalink() ?>" rel="bookmark" title="Read more at: <?php the_title(); ?>"><?php the_title(); ?></a> in the excerpt manually?
0
votes
2answers
35 views

How do I disable excerpts on blogs and website

I want to disable the excerpt from showing in blog and entire website in functions.php file. This didn't work add_filter( 'excerpt_more', '__return_empty_string' );
0
votes
1answer
22 views

How to extract an excerpt from a specific page?

Is there a way to extract an excerpt from a specific page? I've created a child theme and enabled excerpts on the pages. I know how to extract all excerpts for pages... but is there a way to extract ...
1
vote
2answers
42 views

Why do I get the same excerpt for all items in my RSS feed?

I'm new to coding and know next to nothing. I've done a ton research on the web, and I foudn the following code to import an RSS feed and place it in my template. The problem is that while I get 10 ...
0
votes
1answer
35 views

Display Full Content Instead of Excerpt

I want to display the full page content rather than the excerpt in my child theme. If I make the changes to the parent, they appear on the site. If changes are made to same exact file in child, they ...
0
votes
1answer
20 views

Why in archive page doesn´t show read more button with excerpt?

in this page https://blog.despierta.org/page/3/ Last post is with excerpt. If my posts don´t have excerpt show read more If I add excerpt the button doesn´t show. In functions.php // Replaces ...
0
votes
1answer
43 views

Trying to modify content.php

I am trying to tweak the bootstrap basic theme so that it shows excerpts. It does it when using search but not by default. I am trying to figure out what I need to change on the content.php file. ...
0
votes
1answer
33 views

Strip div From Excerpt

I have the_excerpt() in a specific page, I need to strip a div and keep the text, but only in the excerpt of that page. I believe I need to create a function with custom excerpt, but I don't how to ...
0
votes
1answer
91 views

wp_trim_words() does not trim the_content() in WordPress

In my WordPress website, I want to show a short text of each blog_post on the custom blog template. I want to show a Read More button with a link to the post at the end so a user can click on that ...
0
votes
1answer
17 views

How to use limit post content on archive page in WordPress?

I am using the advanced_ads plugin on my WordPress website which allows me to create different types of ads including image ad, rich content ad etc. The plugin allows shortcodes usage for showing ads ...
0
votes
1answer
38 views

Change the number of excerpts displayed in search results layout

WP 5.1 TwentySeventeen (child) theme. _posts_per_page = 1 For search results I want to display 5 excerpts. Using this answer and this page I was able to do that but displayed excerpts are not from ...
0
votes
0answers
21 views

How to change the length of characters in Posts Excerpt in Grid on homepage?

Can anyone help... I have managed to change the excerpt length on category pages using this function uxbarn_custom_excerpt_length( $length ) { return 30; } BUT - what I need is how to change the ...
0
votes
1answer
35 views

Moved a website and excerpts don't work for old posts

I moved a WordPress website to a different host and all post excerpts stopped working in the blog list. When I make a new post they appear fine but doesn't show for the old posts. I peaked into the ...
0
votes
2answers
28 views

How can we display full post on home page rather than excerpt

I have a puzzle website where i am looking for the option to display full question on the home page rather than excerp. Just a note that questions are custom posts. Is there any way. Thanks
0
votes
0answers
70 views

Adding specific custom fields (images) to post excerpt

I am working on a simple user profile archive, using the theme "Atomic Blocks" as a starter theme. I am using one custom post type and several custom post fields to create these user profiles. The ...
0
votes
0answers
48 views

Automatic excerpt option is not working on latest post of a custom theme

I am using HTML blank template for a custom theme. There excerpt option is not working in the live server but in local server the excerpt is working. here is my code function html5wp_index($length) ...
1
vote
1answer
42 views

Excerpt using Read More Tag

How do I get the excerpt of a post that is using a Read More Tag? The documentation states that I should use the the_content function, but I don't want that. I just want the text. Furthermore, I don't ...
0
votes
0answers
117 views

get_the_excerpt() is not working as expected - returns wrong text

In my template's 'footer.php', I'm attempting to generate a list of the four most recent blog posts, showing the featured image, title, excerpt, and a link to view. The title, featured image, and URL ...
1
vote
3answers
372 views

How to display only the excerpt in the blog/posts page with Gutenberg?

I'm building a custom child theme using the Twenty Nineteen default WordPress theme as the parent. I added some text in the excerpt section available in the Editor as follows: But the full content ...
0
votes
1answer
161 views

Remove Default Read More Link in Manual Excerpt RSS Feed

I have a site that displays manual excerpts on the blog post page: https://teralynnchilds.com/blog. I added a custom read more link using the snippet found here: https://wpmayor.com/add-read-link-...
1
vote
2answers
25 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 ...
4
votes
3answers
439 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
33 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
21 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
126 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
20 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
57 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
29 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
1answer
146 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
58 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 ...
-1
votes
1answer
19 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
45 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
12 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
1answer
142 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
28 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
32 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
118 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
65 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
75 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
177 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
1answer
130 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
156 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', '...