Put the following code in functions.php
to show “read more” on all post types except custom_post_type
.
function excerpt_read_more_link($output) {
global $post;
if ($post->post_type != 'custom_post_type')
{
$output .= '<p><a href="'. get_permalink($post->ID) . '">read more</a></p>';
}
return $output;
}
add_filter('the_excerpt', 'excerpt_read_more_link');
Related Posts:
- Mandatory excerpt for custom post type
- How do I filter the excerpt metabox description in admin?
- “More” span making trouble
- Add $more_link_text parameter to the_excerpt()
- Add a tag to a custom post type
- Display custom fields on post excerpt or teaser
- Custom post types: change “read more” text
- help
- custom post data – how to
- More quicktag driving me nuts
- Excerpt function for any content
- How do I show a link or ‘Read More’ button on a custom field excerpt when it is less than the word limit
- Why the_excerpt() function returns excerpt on the Home page and trimmed content in sidebar?
- Why is the output of a call to the_excerpt different when the call seems to be identical?
- How can I add in post’s the text “No content”
- Excerpt length: get first paragraph
- Default excerpt for parent of a custom post type
- Auto generate excerpt from ACF field on a CPT that does not support excerpt or content
- Mandatory excerpt for custom post type
- How can we display full post on home page rather than excerpt
- Adding specific custom fields (images) to post excerpt
- Media is not showing on post page
- Shortcode in excerpt
- Keep custom read more link on the same line as excerpt text
- Certain number of posts with certain excerpt length
- Excerpts and Custom Post Types
- Different read-more link for each custom post type [closed]
- erase post excerpt limitation [×]
- Excert ( the_excerpt(); ) Not working properly
- Excerpt for each post type and for is_front_page
- Add Excerpt On Quicksand Plugin
- How do I add a new custom post format?
- Using /%postname% for a custom post type
- Ordering posts by custom taxonomy in admin area
- Show all sticky posts, WITH pagination
- WordPress search: pretty URLs (permalinks), custom post types and pagination
- Create user role restricted to specific CPT
- Best Way to Leverage Custom Post Type Related Content and Consider SEO
- List taxonomies with thumbnails
- Only Show an Author Their Custom Post Types
- How to customize the Categories meta box to allow only one category?
- Querying CPT with Two Taxonomies
- Get Custom Field Values by Another Custom Field in WordPress
- Wp Rest API request posts from a custom taxonomy
- Disable single view in register_post_type [duplicate]
- Getting a thumbnail for an external video as the thumbnail for a custom post type?
- How to: CRUD for custom post types in the front end?
- How is this CPT code in functions.php adding a hidden “products” category?
- Archives for Custom Post Types (without Pages)
- Insert post metadata for all posts in CPT at once if metadata no existent
- How to alter WP-JSON main query or best practise for custom endpoints
- Function to display custom post type on front page makes menu items dissapear
- Display Recently Added Custom Post Types with Custom Taxonomy Shortcode
- How do I display tags for a custom post type single page?
- Illegal offset type in get_post_type_object()?
- Dynamic dropdown select values depending on other custom field value
- Query Custom Post Type Taxonomy term with multiple parameters
- Post format alternative?
- Load scripts based on post type
- Filter get_cat_id for Custom Post Type
- Why is my WP Query not returning first result’s post meta?
- Custom Permalinks with meta value not working. Why?
- How can I use this code on a custom database table?
- Custom post types and ‘new WP_Query’
- Query Custom Post Types with checkboxes
- How To Get Custom Post Type Category Title
- Having Issue on Ordering CPT by Custom Field In Custom WP Query
- how to count the current posts terms
- Create Custom Post type that uses Page.php template
- Pagination on a page
- highlight parent page menu item when in custom post type
- Combine 2 different custom post slugs into a single permalink?
- Display category name of custom posts only once in the loop
- Metaboxes inside Tab
- Template for Custom Post for the EDITOR
- How to hide bottom navigation (previous/next post) in Custom Post Type plugin in WordPress?
- WP_Query: how to search tags in addition to a custom post type?
- WordPress URL rewrites using Advanced Custom Field
- How to display custom post type taxonomy in Contact Form 7 text field
- Custom post type author issues
- Custom Taxonomy Page
- Do not show child pages within a file page
- How can I prevent the admin to create a new custom post type more than one?
- How to prepend text to custom field value A, but only if custom field value B matches a certain string?
- Custom Taxonomy is disabled on Edit page
- Creating multiple CPT posts from one Gravity form
- Function not pulling image or text from custom post type
- Get link for feed of specific post type AND taxonomy
- Need an idea about how to open a popup which contain only post created form in wordpress admin
- Sorting custom post types by taxonomy (So close)
- Return Custom Post Type Categories
- Associating post id with its post type
- Types plugin isn’t compatible with my custom post type
- Show Posts in Vertical Tabs with Scrollbar
- MF2 and qTranslate problem with custom post types post titles [closed]
- How do I filter a custom post type loop by a field?
- How to order different custom post type in category or tag template page?
- ACF Relationship: Group posts by parent category term, then child [closed]
- Rewrite Rule for custom post type link with or without taxonomy terms
- How to add to taxonomies to a post type