the_excerpt()
automatically echo
es the excerpt text. What you need is get_the_excerpt()
:
<a href="https://wordpress.stackexchange.com/questions/108530/<?php the_permalink() ?>" title="<?php echo strip_tags( get_the_excerpt() ); ?>">
However, it probably won’t strip out ellipses (…) since they’re HTML entities, not tags.
Related Posts:
- Adding Meta Tags to a Post using its Tags, Excerpt and content
- Allow HTML in excerpt
- Disable Attachment Pages Completely
- Edit tag cloud widget number
- Facebook Comment Count
- How to return the_excerpt (without echo)?
- tag search using WP_Query
- Limit the Excerpt field in WP-Admin in words
- show limited tags in an article
- How to add a post or page tag to the list of classes appearing in the body tag’s class attribute?
- How to change / delete product short description in Woocommerce
- Why does running get_the_excerpt() when generating JSON file take 28 seconds vs. 599 milliseconds without it?
- Featured image fallback link to permalink
- Must Use Plugin Causing Query Error
- Custom excerpt function re-factoring
- Do changes to WordPress permalink custom structure affect old urls?
- Adding country tags automatically
- 200 Rewrite blog post links
- How to put “Read more” link in Custom Excerpt inside p tag?
- Error when adding excerpt to the content through functions.php
- wp_trim_words() does not work with my code Am I doing any mistake in my code?
- Changes in permalink structure in WordPress and how to apply to in-site links
- WordPress Persistent connection rule does not work for “posts”
- How to use $_GET function WordPress backend
- HTML tags not showing in excerpt
- Create custom permalinks to show Custom Post Type’s relationship?
- My custom get_the_excerpt() can’t get excerpt by ID
- If tag equals then show else show
- Way to bulk make all my tags lowercase?
- Using the_excerpt() on a page
- List posts that don’t have a specific tag?
- Need to put a script above tag in header.php – WP 5.7.1
- get_template_directory_uri() providing wrong path for img
- Use Tags to initiate Search
- Trying to prepend a Hashtag symbol to the_tags links [closed]
- Almost Done… Post Format Code
- Divi change project category slug
- Custom post type permalinks do not appear using the link functions
- How to Handle Going Backwards in Navigation When Referrer in PHP/JavaScript won’t work?
- Remove   from the_excerpt
- Querying for specific tags
- Limit tags shown in post
- how to edit a specific post slug using a php code?
- Post class only applying to first excerpt; why?
- Creating a Category Taxonomy
- WordPress theme showing blank page
- Assign Custom classes to every Excerpt
- Strip hashtag off permalink with php
- Insert PHP code in Text
- making my own “related pages” / “pages you might like” section
- Can not call .php files after switching to %postname%
- remove specificly the last tag in all posts
- understand what code is doing when prepending /blog
- Allow two posts (from different categories) to have the same slug
- Test the existence of a page/article by its URL, taking in consideration the URL rewriting by filters
- 404 on old link after changing post url
- Custom PHP form needs refresh to load page correctly
- Child-Theme Category View with modified permalinks (%category% removed)
- How to add Text before my Custom Term and hide it when empty
- Rewrite rule not working, but only when parameter is text
- Find and print first entry from WordPress post in custom excerpt?
- Get WordPress username to customize url
- Post permalink buttons all going to the first post
- Permalink changes after several minutes after saving post
- How to edit button permalink inside function.php using a child theme?
- WordPress/NGINX not respecting the category URL for new posts
- How do I create a WP endpoint that retrieves all custom post types that have a tag?
- Cannot figure out how to add a read more link to a manual excerpt. Please help
- Permalink like example.com/taxonomy/post_type/postname
- View tag description on page
- Display tag links on archive page?
- How to associate dynamic PHP page for chosen WordPress tag?
- Get a list of tags present in a paged front page
- Notify admin (by email) if post added with specific tag
- Display product attributes for current product
- Add point on excerpt post
- How to only fetch certain Tag ID’s
- redirect 301 with special character like WIX site “#!”
- Weird slug in archives permalink
- WordPress Rewrite Issue
- A Space being added to url generated by custom plugin
- Newly published content gives 404 on wordpress
- Multiple URL from Custom post name
- Using tag to output text in Genesis?
- Is there a way to randomize and connect a background and header image?
- WordPress – show all posts + ones with specific tag
- get_permalink returning first letter
- How can I add more code to this?
- Get permalink for a post from inside WordPress and route to a related site
- Merging two excerpt functions to work with conditions
- I can’t seem to get excerpts showing inside get_pages and don’t know why?
- Make a permalink to the most recent blog post
- Remove /category/ from category (archive) page URLs (without using a plugin)
- Accessing WordPress Functions get_permalink() in Vanilla PHP?
- Excerpt all post content Content Same Size without word cutting off
- WordPress add parameters with friendly url structure
- Remove post image caption from post_excerpt();
- how to goto specific page number including title with permalink
- How to extract URLs from wordpress taxonomies
- WordPress 6.1.1 UTF8 Slug Limit Increase