WordPress has a helper function built into core, wp_trim_words()
, that was added in v3.3.0.
In your case, simply replace the_excerpt()
with echo wp_trim_words( get_the_content(), 80 );
where 80 is the number of words you want.
Related Posts:
- Custom Post Type Settings page, choose page to display archive
- Custom taxonomy template not working with simple loop. Multiple CPT using the same taxonomy
- WordPress custom post type archive with description
- Custom post type is showing custom home page, not archive page
- Custom post type archive page blank
- My archive-posttype.php template is not loading
- Custom Post Archive is not working
- How to integrate single and archive templates for custom post type in any WordPress theme
- Custom Post Type Archive template not being called
- Is possible register two archive pages for single custom post type?
- Archive page of CPT’s custom Taxonomy
- Finding the CPT archive template source
- ACF Pro Accessing fields on a Custom Post Type
- Show index and not the archive for “Dog Custom Post” with default slug
- Custom post type archive page not showing on archive-posttype.php
- Custom post type with two templates
- How do I make my archive page look like popular reviewing sites (e.g., Polygon and Gamespot) [closed]
- Display custom post type archive on page.php template
- Making a archive gallery page for a custom post type which already has an archive page
- Pagination not working only on Archive-Name.php using new WP_Query
- WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
- How to remove custom post type archive
- How to use a custom post type archive as front page?
- Custom Post Type Archives by Year & Month?
- Get custom post type slug for an archive page
- Create a custom archive page for a custom post type in a plugin
- Adding a menu item for a Custom Post Archive
- Custom Post Type Archive Page not showing
- Adding custom post type archives to a WordPress menu
- How to set a custom post type to have viewable future posts
- Custom Post Type Template – Archive
- How to get the custom post type from an archive page?
- Page Template as Custom Post Type Archive
- Custom post type yearly/ monthly archive permalinks
- Can’t get post id on page that is a custom post type archive
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- How do you create an archive for a custom post type from a plugin?
- Proper way of making custom post type landing page or archive page
- Custom Post Type Archives by Date with Custom Permalink
- Loading custom page template via plugin
- How to List All Custom Post Types Names (Not Posts)
- Change title in head on Archive page
- Custom Post Type Archives with 0 Posts Redirects as 404
- How to filter custom post type archive by meta value
- What are the advantages of using a custom post type archive?
- Page is defaulting to archive page and not designated template
- custom post type archive page url to point to Page permalink
- “Edit” option for custom post types archive page
- Custom Post Type archive as front page
- Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?
- Get monthly archives for custom post type
- Is it possible to remove the posts_per_page limit on a specific post type?
- Add Settings to Custom Post Type
- Is it possible to have an index page for taxonomy term for each custom post type it is assigned to?
- Custom post type permalink structure with the category also acting as an archive
- How to get_queried_object on multiple objects?
- Custom Post Type Works but Still Shows “Page Not Found”
- Assign Page Template Within A Custom Post Type
- Custom Post Type / Taxonomy Slug / Post Title with post type archive
- Rewrite custom post type url’s adding meta box values
- I can’t set meta_key in my custom post type query
- Hide child term posts on parent term pages
- Posts per Page on custom Taxonomy Template
- Compare 3 custom fields and sort by oldest
- Post type archive page not working
- Adding Sticky functionality to Custom Post Type Archives
- paginate function in archive for custom-post-type
- Adding custom post types to archive.php
- Custom Post Type – Archive page title
- Alphabetical sorting of custom post type – one letter per page
- List all posts in Custom Post Type but group dynamically by Custom Taxonomies
- Archive page for taxonomy of custom post type
- Pagination problems with multiple custom post type archive pages
- Add meta data to the custom post type ARCHIVES page
- Should I change these content meta types before building complex archive page?
- archive-{$post_type}.php not loading. instead the default archive.php loads
- Getting taxonomy terms used by custom post type
- Custom post type archive sorted and grouped by date in post meta field
- Archive or taxonomy pages not working for custom post type
- Create Custom Post Type Archive Page with Sub Categories Navigation Sidebar
- Custom Post Type archive giving 404
- How to create archive page for taxonomy terms within custom post type
- How to make an archive page displaying posts in a date range
- Categories and Tags not working!
- Custom query variable – get wordpress to redirect to nice permalink url
- CPT: archive-cpt.php VS custom page template
- Custom-post-type-archive: posts sorted/filtered by year?
- How to list custom post types?
- I am facing problem in my archive page , it is partially working
- Custom post type and taxonomy permalinks – Structure
- add_rewrite_endpoint() and Custom Post Type Archive
- Custom post type archive page pagination
- Add the current menu item CSS class to a custom page type archive in WordPress menu
- Display Next/Prev when looping Custom post-types archive?
- Add custom post type archives to search results?
- Archive page for custom post type not working
- taxonomy template for custom post type the same as the archive
- Editable content on a Custom Archive page
- Display only post types that are direct children of the current taxonomy
- Navigation menus not showing because of custom post type filter