get_the_content()
does what it’s supposed to, gets the content. You’re looking for get_the_excerpt()
. 😉
Alternatively, using what you have, it should cut off wherever you put <!-- more -->
in your post when using get_the_content()
.
Related Posts:
- Get Posts Under Custom Taxonomy
- Stop WordPress automatically adding tags to post content
- How to show related posts by category
- WordPress removing tags?
- get_children() Not Working with orderby Parameter
- How to get all posts related to particular category name?
- get all posts ID from a category
- get comments and get posts in loop
- How to know if get_posts() failed?
- Update all posts automatically when using post_meta
- Search & Remove Specific Shortcode From All Posts
- How to display posts by current user/author in a custom page template?
- How to get previous 10 days post from a specific date – WP Query
- Shortcode Not displayed at the Right Place [duplicate]
- Automatically added brs and paragraphs?
- Show the title of the latest post by author
- Setting pagination for images attached to a post
- Query only Posts from Both of Two Category?
- is there a better way of combining this?
- If post does not exist, do something
- List latest posts with least comments in WP-Admin
- Internal linking to posts permalink fail because of spaces and stripe at postname
- Get posts from current category?
- Shortcode for tables which can include comma and linebreaks
- post/page content
- How to add content above footer in posts from specific category
- How to show multiple posts thumbnail, title and date in widget
- I need to create “View Profile” and “Edit Profile” links by incorporating the Post Title/ID, but can’t seem to manage it
- Show only posts with titles/permalinks that do not contain certain words
- Change published date and time using SQL query for page in every 5 hour
- How to merge the content of posts that have the same title?
- How to add first 3-4 post tags on WordPress Post Title
- What parameters do I need to pass to get_tags to get ALL tags for the site, when used in a post
- Shortcode for Comments and Comment Boxes in Post Loop
- get category in list of posts // shortcode for custom related posts
- shortcode // get posts by ids
- get posts, run a custom query, and join the results
- Display “no post” message
- How can I create a shortcode to show the number of posts of actual day?
- Featured Story Shortcode not outputting content
- Function is printing twice – any suggestions?
- How to pull sticky post permalink inside php?
- Contact Form 7 Shortcode not recognized inside another shortcode
- Display Post from Custom Post Type with Shortcode
- wp_insert_post() Add and specific ID to the body of that
- How to mark only one post as Featured post?
- Add a url parameter to the current post and read it in a shortcode
- get_next_post() not working with future post status
- Extracting the permalink from a post instance
- REST API Working for GET but not for POST?
- Fill the exclude array() in get_posts()
- Posts page listing pages as well
- Secretly passing post ID/title etc into a shortcode form automatically to link submission to post
- WP_Query to get posts in a specific tag or has post_format
- I need show posts by customer (Shortcode)
- How to Get Position of a Post from a category and tag
- How to add navigation arrows to manually slide through posts?
- Is it possible to query a category with specified posts?
- How to convert return type of ‘get_posts()’ same as ‘wp_get_recent_posts()’?
- How to get all posts in gallery post format template
- Shortcode: How to add custom posts?
- Any difference betweenn posts and pages for one page?
- How to get the current user post and it’s ID?
- Add category attribute to custom recent post shortcode
- Shortcode for printing post titles
- How to use extract shortcode in loop?
- Using Post ID and Page ID in same function
- Retrieve latest post by multiple categories with ID
- External link not showing on post but showing on comment
- How do I paginate posts page with $wpdb?
- How to get all post titles starting with numbers and symbols?
- Display only posts with comments
- Bulk Attach Or Insert Media To Post Without Opening Post Editor
- Change the default video URL in a post to shortcode format
- Displaying posts on Homepage
- How to get single post by one author?
- Load posts from external source if not found in database
- How do I add an article to specific page?
- get_posts includes “auto drafts”?
- get value from post to sidebar
- WordPress Yoast SEO plugin Post Save/Update Issue
- If post has non-shortcode string
- Insert Shortcode exactly at the end of the content
- wordpress show category link instead of post link [closed]
- Display posts from another page on home page in wp-editor
- Trying to create shortcode listing custom posts, but formating not being included
- posts_per_page – Repeats only first posts ‘post__in’ array
- append $_GET parameters to post
- NewsPaper WP Theme – Additional Related Posts Filter by Time (divTag composer)
- Word count for all posts of all authors
- View post with specific category id and name which I selected in the backend (drop-down option)
- Simple shortcode to check if a user has commented on a certain post
- Undefined Function Fatal Error with Shortcode [closed]
- Translation related post text to Arabic
- How to use shortcode to get the second to newest post?
- How can I guide user to the next unread post within category
- How can I strip a single tag from an email post
- How to show related posts by detecting the current category?
- How do you export and import wordpress blog posts and exclude pagebuilder shortcodes?
- Shortcode in loop always display data of first post on the page