By truncating, do you mean using the_excerpt()
rather than the_content()
? Or do you mean using the_content()
with <!--more-->
tags ?.
In either case, you can alter how a post behaves by using the following:
<?php
if (have_posts()) :
while (have_posts()) : the_post();
//We check that we are this is the first post in the loop AND
//that we are on page one.
//(Probably unnecessary) but to be safe you can uncomment the next line
//global $wp_query;
if(!is_paged() && $wp_query->current_post==0){
//First post of first page, show full content using the_content();
//This will display up to the first <!--more--> tag - not clear if you are using this.
}else{
//Otherwise display the post as normal / using the_excerpt();
}
endwhile;
endif;
?>
Related Posts:
- Get list of all registered post types slugs
- tag.php doesn’t work with tags on a custom post type post?
- How to build a complex page structure
- Proper way of making custom post type landing page or archive page
- If featured image doesn’t exist, show post content
- Getting a div content of a post in wordpress?
- Rename a current used post type
- Include custom post types in categories widget
- Pagination gives 404 error
- add_meta_box: Datepicker like the one for postdate?
- How do you use JavaScript to detect the homepage
- Custom field losing p tags on display
- I am trying to output portfolio items with a picture. This code doesn’t seem to be working. What am I doing wrong?
- How to customize admin posts based on the user who is logged in
- Custom post type – how can I make it a sub-url of another page?
- Custom taxonomy template for multiple custom post types
- How to debug a blank page?
- apply filters only to specific post listing without check the url parameters
- Adding `supports` array to WordPress custom post type
- URI returns a post when it should return a 404
- Twenty Fifteen: Adjacent posts by menu_order [duplicate]
- Custom post type menu missing after 3.0b2 -> 3.1.2 upgrade
- Email friend for each Custom Post Type posts on a page
- How to make custom post type feed title = taxonomies?
- Change meta box when the page’s template is changed
- Custom Post Type Loop throws 500 error when used in widget
- Define new user capability for custom post types?
- Trouble with CPT Child 404
- How to have the same url structure for both a CPT and a Taxonomy?
- How to create custom url structure based on custom post type rewrite slug, taxonomy and category slug?
- customise template to only show custom post type entries
- Programmatically rewriting slug through functions.php but returns 404
- limit value taxonomy based on previous taxonomy value wordpress
- Problem: wp_query outputs all images on site
- pre_get_posts for custom page builder meta box
- Pre-styling post content to display in lightbox
- How can I get this request to use the Custom Post Type page template instead?
- Include custom taxonomy term in search
- How does order=asc effect a wp_query (its acting pretty weird in a loop)
- Get Post Types in admin
- How to query 2 custom post types that need to share a slug?
- Get rid of “trash can” for custom post type
- Create metaboxes based on custom post type
- custom post type and custom taxonomy
- Custom post type as child of page
- populate array with posts
- Transferring data to the end of a transaction with the Shopp Plugin
- Listing custom post types on archive page with array
- Get custom post type categories to show up in menus
- How to loop through custom taxonomies and sub taxonomies and display posts?
- Custom Post Type: Show Similar Posts
- Get uri of CPT archive page
- Building a Portfolio and need some direction
- Checking whether post is deleted or saved in edit_post
- Query Custom Post Type by Taxonomy
- Why is my custom post query shortcode only showing 1 post?
- Create list from custom field comma separated values
- How to fix the Post Preview Button (CPT & map_meta_cap)
- Fetch data from two custom post types and create multidimensional array for output to html table
- Restrict Custom Post Type per role in Dashboard
- Create a Dropdown Selector and Redirect for a Custom Taxonomy in WordPress?
- How to Implement Search Functionality?
- Adding /blog in front of single posts (only)
- Query filter by value in meta_value array
- wp rest api orderby field in a custom table
- Expire post to draft by date-picker custom field
- Edit the default ‘post’ custom post type arguments
- Post template with breadcrumb needs to show page navigated from
- Publishing failed. The response is not a valid JSON response
- add all blog posts to folder
- ‘Simple’ Reservation System
- Custom post type, next and previous links by page title
- Reading Custom Post data so I can have user update Manually
- Custom post types – meta_query: search lesson which starts sooner
- Custom Post type plugin is using theme single.php and style.css
- WordPress Custom Post Type – Post Attribute: Template. Template shows up and saves on the back end, but the default theme file is being rendered
- Most efficient way of showing children posts?
- Capabilities and mapping required for a role to be able to edit other’s posts of a custom type, BUT only be able to edit their own blog posts
- Permalink Problem with Custom Post Type
- Automatically convert standard posts with custom fields to custom post types
- How To Display Category list from Portfolio post type plugin?
- Custom Post Type tag taxonomy “Page Not Found”
- Remove custom post type slug but keep related category taxonomy permalink
- Adding CPT changes entire layout of my site except for the archive of that CPT
- page not found for example.com/custom-post-name
- How to show Y number of custom posts after every X normal posts?
- custom fields not showing before get_header
- Why is my custom post type shown in the wrong place?
- Display Custom Post if custom field is marked
- Custom post type category page not working
- Turn off comments for given CPT checkbox?
- Categories in custom post types
- List a custom post type’s posts ordered by nested custom taxonomy
- listing custom post type category page
- Inserting random posts
- Rewrite a filter as shortcode (or something like that) to use anywhere in CPT
- Custom Post Type urls not working
- Just the First Metabox what saves the data!
- pre_get_posts causes Custom Posts appear under ‘Pages’ menu
- Categorizing Custom Posts in Bulk Based on Title