If you adding this code in content.php
then you should use conditions.
<?php if ( is_single() ) : ?>
<?php the_content(); ?>
<?php else : ?>
<?php the_excerpt(); ?>
<?php endif; ?>
Related Posts:
- How to remove “read more” link from custom post type excerpt
- Mandatory excerpt for custom post type
- How do I filter the excerpt metabox description in admin?
- is_singular() not working if called via callback function of admin-ajax.php
- Prepend regular Posts with custom slug, without affecting Custom Post Types?
- Custom post-type in root directory, blog posts in subdirectory
- How to stop subdirectory wordpress install adding head elemets to entire site?
- Add $more_link_text parameter to the_excerpt()
- How to post twitter like updates on wordpress
- Blog page showing same content as homepage
- Display custom fields on post excerpt or teaser
- How to create Blog Post Specific Widget
- custom post data – how to
- Excerpt function for any content
- Display Only Certain Category In a Custom Page Template
- 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
- Add Pagination in custom Blog page template
- 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
- Post display in separate page [duplicate]
- 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
- erase post excerpt limitation [×]
- Excerpt for each post type and for is_front_page
- Add Excerpt On Quicksand Plugin
- Add /blog to the “post” post type url
- Wp-theme Development
- Custom post type disappeared in wordpress when I transferred theme to Showit
- Where are wordpress custom types stored?
- Get post ID from wp_insert_post()
- Populate a ACF Select Dropdown from Custom Post Type
- Get post type in header.php
- Display CPT taxonomies as an archive page
- Unable to show recent custom post types in default recent posts widget
- Writing Custom Rewrite Rules that Incorporate Category for Custom Post Types?
- Can’t edit Custom Post Type slug/permalink
- ACF Upload Image in repeater from front-end with custom form? – add_post_meta()
- Rewrite numeric ID parameter for hierarchical custom post type
- query_posts with a custom post type, a meta_query and sorting by post date?
- How to get “custom post type”-archive with working permalink to it?
- Custom loop with multiple taxonomy queries
- Tags not working in my custom post type
- wp_trash_post action hook with custom post type
- Custom sidebar for custom post type
- Display next 3 posts based on custom taxonomy
- WordPress custom posts and permalinks
- Display latest post of taxonomy
- How To Read Read Custom Post Type Data in Headless CMS Mode
- Set Post Private if no linked Post Objects (ACF)
- WordPress shows after migration
- Media is not showing on post page
- Edit custom post type page with ACF repeater fields throws ‘Service Unavailable’ error
- Redirect sub-page URLs to parent without changing URL
- How to decouple custom post types components from template?
- Custom post type cannot access child page
- display some fields in custom post backend
- Menu that shows months and filters posts to show only posts from that month and shows posts as sub items
- Drop Down Filter with CPT as Options for Search Form
- Custom post types not showing in the admin menu on production, but shows locally
- How to add custom settings to the menu of custom post types?
- Custom post type split title, setup permalink accordingly
- Pagination not working on custom post type archive
- How do I provide a search form for a specific post type, that is capable of searching within custom fields of the specified CPT?
- How to get permalink of post based on post name?
- Best practice to display a list/archive of Custom Posts in a Page Template
- add_rewrite_rule not working with custom post type
- Redirect Author Archive to Custom Post Type With Query Vars?
- Cannot change meta box position
- WP_Query() displaying past post / event
- WP Query Conditionally query meta and taxonomy
- Display posts, subcategories and categories of custom post type and taxonomy
- Archive pagination – second page shows exactly the same posts
- Display all child posts in a custom post type, grouped by a custom taxonomy site
- Multiple custom post type in URL
- Custom Gutenberg block problem – This block has encountered an error and cannot be previewed
- Comments not working (error not allowed) on posts with custom post status
- Using wp_insert_post to create custom posts with ACF image field
- Admin menu link with variable
- Modifying post_type_link hook messing up edit function for a custom post
- Two Permalinks with one Taxonomy (custom taxonomy) and (custom post type -> custom taxonomy)
- Removing custom post type name from permalink
- One WP website as content source for several others
- Custom Taxonomy rewrite rule working for everything other than singles
- Display custom post type attached media file sizes
- Custom post type REST api 404: Updating failed. No route was found matching the URL and request method
- Admin user get message higher level of permission to edit taxonomy
- Have Custom Taxonomy Slug Fall Under Custom Post Type Slug
- Adding Taxonomies to Custom Post Type Without Displaying Blog Post Categories
- Change post-name when inserting new Post if Specific Category is selected in WP
- What would be the optimal CPT / Taxonomy design for the following entities structure
- How can I rename custom taxonomy if multiple custom post type have the same taxonomy name?