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
- How to get URL of current page displayed?
- Allow HTML in excerpt
- Disable Attachment Pages Completely
- Edit tag cloud widget number
- How to automatically apply woocommerce product title to all product images alt tags?
- remove tags from posts in php
- how to get permalink structure with php
- Facebook Comment Count
- How to return the_excerpt (without echo)?
- tag search using WP_Query
- Limit the Excerpt field in WP-Admin in words
- How to Remove Parents Category Permalink from Posts
- Limit the_excerpt with max of x characters
- Remove at the beginning of the_excerpt() with str_replace
- show limited tags in an article
- add_rewrite_rule with bottom priority doesn’t handle the WordPress pages
- display most popular tags in two columns
- Automatic Excerpt Not Working
- Trim first 2 words of the exceprt
- How to add a post or page tag to the list of classes appearing in the body tag’s class attribute?
- Changes in permalink structure in WordPress and how to apply to in-site links
- WordPress Persistent connection rule does not work for “posts”
- WordPress every page is 404 not found including admin resources
- WordPress returning 404 for multisite pages
- How to use $_GET function WordPress backend
- HTML tags not showing in excerpt
- Adding Taxonomy Image to taxonomy loop [closed]
- Create custom permalinks to show Custom Post Type’s relationship?
- Query Pages and post excerpts dynamically
- 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?
- Pull Tags But Not as Links
- Using the_excerpt() on a page
- List posts that don’t have a specific tag?
- Edit the_category (); for a hierarchical display
- Need to put a script above tag in header.php – WP 5.7.1
- How to get post permalink url without a href
- get_template_directory_uri() providing wrong path for img
- Use Tags to initiate Search
- Filtering a function’ output for a new continued function
- Trying to prepend a Hashtag symbol to the_tags links [closed]
- How to show an entire post content and not also the excerpt?
- Almost Done… Post Format Code
- Change product_base programmatically
- Automatic excerpt is not shown with the_excerpt() command
- 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 slugs from custom posts type
- .html end of URl affected to SEO?
- Remove   from the_excerpt
- Shortcodes showing in excerpt despite using strip_shortcodes
- How to tag the main tag? [closed]
- How to remove the space before the ellipsis in excerpt?
- Need help removing […] after excerpt
- Querying for specific tags
- Search only working on front page (index) , not working on other pages
- Limit tags shown in post
- how to edit a specific post slug using a php code?
- Post class only applying to first excerpt; why?
- How to add Post Tags to a new element in header.php?
- Creating a Category Taxonomy
- WordPress theme showing blank page
- Assign Custom classes to every Excerpt
- Strip hashtag off permalink with php
- Commas in Tag Cloud
- Insert PHP code in Text
- making my own “related pages” / “pages you might like” section
- Permalinks: site.com/post-tite vs site.com/post-id/post-title for SEO and Speed
- Can not call .php files after switching to %postname%
- Problem in replacing the_content with the_excerpt()
- Getting a WordPress tag to print inside of a traditional php echo
- WordPress permalink issue
- remove specificly the last tag in all posts
- How to exclude labels from certain categories in a shortcode?
- Change permalink structure specific category
- understand what code is doing when prepending /blog
- Custom URL for multiple categories hierarchy
- WordPress redirects to localhost
- 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
- Tag title not being returned in page title of tag archives
- url not using query string no longer working
- Custom PHP form needs refresh to load page correctly
- Child-Theme Category View with modified permalinks (%category% removed)
- Getting checkboxes for some tags in a search box
- Remove slug of multiple custom post types with and without hierarchical
- How to change product title color in shop page if product has specific product tag (Woocommerce)?
- Modify the permalink structure for a specific category
- change the blog in the url if you go from a specific page wordpress
- Is it possible to go to the next post in the same category?
- I have issue with decoding json ex. ‘{“a”:”b”}’
- WordPress per ACF – permalink is not working
- Processing data and redirecting with query string
- I’ve added SKU to Woocommerce permalinks, but I have small issue
- Post returns 404 after changing the permalink using post_type_link
- Cannot access the other pages after successfully editing post type