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
- A developer set a ‘standard format’ for my blogposts on wordpress but i need to remove it, how?
- Custom post type – list posts based on meta_key and display them divided by CPT taxonomy category
- Get $post->ID from a URL
- Redirect to archive is single post has a certain term assigned to it?
- Using page slug in wp_query
- Custom Post Type with Custom Taxonomy as Category
- How to display CPT archives?
- WP_Query() with custom post type and taxonomy — get all terms?
- Displaying a div from an assigned meta_value when on a page
- Save and user submitted data from a form and display them in the wp backend
- Why isn’t a list of posts from my custom post type displaying in this widget?
- Change “empty trash” button text?
- Assign category a default post type
- Custom query – get_the_terms not work
- WPDB for post count on post
- Specify a particular page to list all custom types
- Programmatically change post visibility on save_post action return a 500
- Query & the_content() is showing in the header
- Custom meta Title for custom post type archive from page
- post_parent in custom post type
- Meta data (Tags and Categories) for Custom Posts not showing.
- Front end access to a SQL data repository – recommended way?
- Custom Meta fields Update hook?
- How to display custom field value on page?
- Displaying custom post types in front end
- Navigate posts with different post type that are in the same categories
- Custom taxonomy (categories) on custom post type return no results
- Page listing Custom Posts
- post_per_page ignored in WP_Query
- the_title not working
- Display different information of a custom post type
- Custom taxonomy wp_query woes.
- WordPress app page not found error for posts with hyphen in permalink
- Where is the sticky post option?
- get_the_tag_list() returns bad links
- Add term list as class
- Filter second dropdown (tax) based on first dropdown (cpt)
- Dump custom post type database
- uploading problem of wordpress theme
- Excluding a Custom Post Type with a specific tag using pre_get_posts
- Custom Post Type Link added to menu won’t show in frontend
- show all custom posts types in home page
- List of users that clicked a ‘Join’ button at single post
- Taxonomy archive 404ing (not term archive)
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- Variable not working in WP_Query
- WP_query – Filter by tax_query and meta_query using multiple select
- Display an authors post on a single page only when they are logged in
- How to group navigation items in the admin panel
- Hide meta box for everything BUT a certain custom post type
- Include php on a specific page template
- Create Array from custom post type to display a slider
- what custom post type this archive belongs to?
- Setting Post Title via Meta Data returns Auto-draft
- Tags not working in my custom post type
- Custom post-type metabox position
- wp_trash_post action hook with custom post type
- Not sure why this template for custom post type posts isn’t displaying anything. What’s missing?
- What’s an efficient way to change the post status of many posts at once?
- Use Pages for Custom Post Type
- Return the name of the post type
- I can’t access custom taxonomy page listing
- Is it possible to load a different sidebar in single.php based on a meta_query filter?