Replace text in excerpt

You code works where the function the_excerpt is used. It does not work when get_the_excerpt is used, which does not apply the the_excerpt filter. It applies get_the_excerpt instead. Using get_the_excerpt will cause the filter to apply to both the cases since the_excerpt() uses get_the_excerpt(). Automatically generated excerpt content is a different thing since it is … Read more

Make only the image an anchor link using the advanced excerpt plugin?

To get a link around only part of the excerpt content you will need a filter on get_the_excerpt similar to the following: function dummy_excerpt_filter($excerpt) { // manipulate the excerpt return $excerpt; } add_filter(‘get_the_excerpt’,’dummy_excerpt_filter’); The problem with that is that the // manipulate the excerpt part means using regex on your excerpt content, which can be … Read more

Adding […] string for a custom excerpt function

I have a custom except function I use all the time, it will cut off in the middle of a sentence, but it works great. Just drop this baby into your functions.php and then <?php the_excerpt_truncate(100); ?> just change the 100 to your desired character limit. // THE EXCERPT MAX CHAR function the_excerpt_truncate($charlength) { $excerpt … Read more

making the […] clickable

Add the following piece of code just below <?php the_excerpt(); ?> inside the loop as explained in the codex Excerpt <a href=”https://wordpress.stackexchange.com/questions/130898/<?php echo get_permalink(); ?>”> Read More…</a>

The Excerpt gets page excerpt instead of most recent post excerpt

Your problem is that you’re using $recent_posts as your variable name. If setup_postdata() isn’t working, then your the_excerpt() should return whatever the excerpt is of the current page. From the setup_postdata() codex page: You must pass a reference to the global $post variable, otherwise functions like the_title() don’t work properly. So change this: $args = … Read more

The excerpt suffix won’t go away

The excerpt has a maximum lenght of 55 words, so even if you try to cut your text at say 70 words, the_excerpt() will ignore that and only show 55 words. To remove[…] from the read more tag, simply find the_content() and replace it with the_content(”,FALSE,”);. You can also use the_content(‘Read more…’); to display a … Read more

How to remove excerpt white spaces

If you want to remove white space after you get the excerpt, then you can do as below. First get the excerpt as $excerpt = mb_substr(get_the_excerpt(), 0, 236); Then do a string replace for space as echo str_replace(‘ ‘, ”, $excerpt);

Creating excerpt with simple “Read more” link

Though it’s a bit of unnecessary things to answer your actual question, but for the fact, I used the following code into many of my News Portal WordPress sites, where I had the facilities to Control the excerpt length, and I changed the excerpt More link to my choice. All I did was using my … Read more

Replacing the ellipsis with three dots

Hi I’m not 100% sure I understood your question correctly but give this a try if you want to replace that excerpt […] with anything you want. You can use this hook to manipulate that. Where “More” is after the &nbsp you can use what ever you’d like or even use CSS to change it’s … Read more

My post excerpt does not work

WordPress uses index.php to display your Blog Page or Archives page and hence they will always call for excerpt.(Unless it is modified otherwise). Now, single post or articles will be calling the content-function displaying the full content.Follow the below steps :- Step 1 :- Open your single.php and check for <?php the_excerpt(); ?> Step 2 … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)