Tagged Questions

Excerpts are short texts or summaries

learn more… | top users | synonyms

0
votes
1answer
202 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
704 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
44 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
18 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
429 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
40 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
245 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
56 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
149 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
94 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
87 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
821 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
120 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
198 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
168 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 ...
1
vote
1answer
478 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
102 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
948 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
457 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
84 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
1answer
214 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
470 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
135 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
982 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
163 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
126 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
266 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
101 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
61 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
121 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 ...
9
votes
2answers
1k 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
154 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 ...
1
vote
0answers
237 views

Regenerate auto excerpts after updating many posts

I had around 100 posts that I imported into my blog. Many of the special characters (e.g. apostrophes, etc) were mangled upon import. I finally went through and fixed them all manually by editing each ...
2
votes
2answers
304 views

Auto Refresh Post List after X seconds

i'm new in wordpress, and i really need a help here. My main site, list the resume (excrept) of all posts, with pagination. But when a user publish a new post, the only way to see it on the main page ...
-1
votes
2answers
136 views

Get a raw value of excerpt

I am trying to print the post excerpt using the following code: <?php echo $post->post_excerpt; ?> It works fantastic the only problem is that apparently I get also predefined styles and ...
1
vote
1answer
913 views

How can i display the content in plaintext

i want to display my excerpt in plaintext. How can i do this? This is my Snippet where i display the content: <?php the_content(__( 'Weiterlesen &rsaquo;','okay')); ?> How i change the ...
2
votes
2answers
392 views

Can I have two single.php files and have one display just the post and the other display comments for that specific post?

Obviously, I know I can't have two single.php files. The one with the comments would have to have a different name...maybe single-comments.php or something. I am working on a restaurant reviews site ...
0
votes
2answers
116 views

Creating a function that sanitizes the custom metabox excerpt

I'm still getting to grips with functions and experimenting with different php functions. I've created a function what I want to use in sync with my custom metabox excerpt. It will basically sanitize ...
0
votes
2answers
46 views

Adding […] string for a custom excerpt function

My blog is photo-oriented and the theme has a special excerpt function that, for better or for worse, I'd like to keep using. Anyway, it displays the excerpt and then the "More", but it just ...
0
votes
1answer
56 views

has_excerpt yields true but no post_excerpt when retrieved

echo has_excerpt($att); //Results in True echo $att->post_excerpt; // results in empty. echo $att; // results "782" which is the ID of the attached image. If I use get_post_meta( $att , ...
0
votes
1answer
69 views

Replace text in excerpt

I have a separate theme for my custom WP install that will be use for mobile users, in my case I need to change an html tag in all the excerpt instances but without altering the DB, I found this ...
1
vote
1answer
49 views

read more, even if excerpt not trimmed

I am using the excerpt field (Not the tag, because the excerpt also serves as a lead paragraph). I altered the "more"-link to be an arrow >. function fabs_excerpt_more( $more ) { return ' <a ...
0
votes
1answer
66 views

[Plugin leenk.me]modify get_the_title

I use a plugin called leenk.me to post messages to Facebook based on my posts. One of the custom fields is %TITLE%, which posts the title of my post and the link to my post. if ( false === ...
0
votes
1answer
80 views

Why archive page can't show full content?

I use "insert more tag" insert more tag for a post. It works fine, at front page show excerpt, at single page show full content. but at archive page show excerpt, I want show full content here. Here ...
3
votes
1answer
647 views

Neither the_excerpt() nor the_content() works properly?

I'm wondering what should be used in index.php (post listing page): the_excerpt() or the_content()? Twenty Thirteen uses the_content() but this prints entire content unless <!--more--> exists ...
0
votes
2answers
319 views

How to add excerpt in loop in Twenty Eleven theme?

Here is my loop code located in index.php file. I am using Twenty Eleven theme. <?php if ( have_posts() ) : ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ...
1
vote
1answer
107 views

Custom Excerpts Per Page

I'm trying to set up a specific page to use a specific number of characters in an excerpt. I tried using this code, but it broke the site: function wpse61271_custom_excerpt_length( $length ) { ...
0
votes
2answers
212 views

Add rel=lightbox to custom string

I'm using the following code in my functions.php to show thumbnails in my excerpt: function pietergoosen_kry_eerste_prentjie() { global $post; $first_img = ''; $output = ...
0
votes
1answer
816 views

apply_filters('get_the_content', $content) + Except

I'm using the following function to load my content dynamically: apply_filters('get_the_content', $content) However, I would like to apply an excerpt to this method but the only way I know how to ...