get_the_content()
return what’s in the editor, but wpautop
filters and such are attached to the_content
(which you don’t need inside your split function – just apply it later manually with
apply_filters( 'the_content', $output );
at the end.
You should as well use strip_shortcodes( get_the_content() );
before splitting it up:
$output = get_the_content();
$output = wp_trim_words( $output, 500 );
You’ll need to loop through it as long as you got content and array_push()
to your $output = array();
.
Related Posts:
- Stop WordPress Wrapping Images In A “P” Tag
- How to get ‘post_content’ without stripping tags?
- Get content from one page and show it on another page
- Removing any and all inline styles from the_content()
- How to disable content pagination?
- Modify ‘Read more’ link adding a new class
- Adding a div class or id inside the_content()
- Post content being duplicated by the_content();
- How can I extract the URL of a link from a post?
- Content editor creating blank paragraphs in spaces and creating   in the_excerpt
- How to add custom content (text/image) at start of content (IN content ie the same line)
- Testing for post title in ‘if/else’ statement returns no content
- Display the Content of a Post with qTip2
- How to show video from specific category on sidebar?
- custom post type grid with content in lightbox [closed]
- Uppercase first sentence in every post
- Why content_arr[‘extended’] removes paragraph tags?
- Modify Image Source With The_Content Filter?
- How to add pagination in between post and comments?
- Adding the_date inside tags around the_content
- Show the content that is after the excerpt using child theme
- get query() without post content?
- How to show full post?
- A/B testing of posts with unique URLs for each variant AND editing in custom fields
- Filter only the text in the_content
- How to check if single.php has already called the_post_thumbnail function
- How to disable the_excerpt from one post
- Add div before the first paragraph the_content [closed]
- the_content() Not Grabbing All Content
- How to split authors?
- Adding if statement into the_content()
- why my urdu text is not aligned properly when written in wordpress blog post?
- How do I display main query posts in random order using add_filter
- How to exclude native lazy loading from first image in post content?
- How to remove special characters in post title
- How to limit wordpress the_excerpt() dynamically
- how can i take wordpress post as embed?
- Retrieve posts inside foundation tabs and tab-content split by 3 per row
- if CPT content is empty then
- Find post tags words in post content and link them to tag URLs
- Add review box by function at top or bottom of content
- Add Image Before Posts Entry Title
- Showing content from WordPress ruins page CSS using WP_Query, without, content does not show
- Assign custom class to post content images
- the_content() not displaying the full post
- Stripping tag from elements in post
- How add class the_content();?
- Get WordPress post content by post id
- Get page ID of page that is set as the posts page
- Get Posts Under Custom Taxonomy
- How to limit the number of posts that WP_Query gets?
- When is the ‘post_content_filtered’ column in database cleared by WordPress?
- Turn a URL into an Attachment / Post ID
- GET the excerpt by ID
- Stop WordPress automatically adding tags to post content
- Determine if page is the Posts Page
- How to add an admin notice upon post save/update
- Print Current Post Index number within Loop
- Should we trust the post globals?
- Optimize post insert and delete for bulk operations?
- Get the Current Page Number
- How do you add thumbnail support for custom post types?
- How to mark every 3rd post
- Change Posts per page count
- Keep featured content post in homepage with original order
- How to display related posts from same category?
- Can posts have parents?
- Is there a action hook for the “Empty Trash” button?
- How to end the excerpt with a sentence rather than a word?
- How do I check if I linked to a post before I delete it?
- How to change the case of all post titles to “Title Case”
- Appending content with broken in 4.4
- How to get posts published between a date and today?
- ZIP up all images displayed in a [gallery] and offer as download link
- How to detect single.php (but not single-portfolio.php)?
- How to check if post meta key exists or not in wordpress database
- How to remove a column from the Posts page
- removing inline styles from wp-caption div
- What is the use of to_ping and pinged column?
- How to use “Add link” pop up for a WordPress widget
- Remove Categories / Tags From Admin Menu
- How to retrieve text only from wp_content() not from wp_excerpt()?
- Stop WP from creating “Sample Page” and “Hello World!” post
- Where is the old post permalink slug stored?
- How to Create Editable Blocks of Text for the Homepage?
- Keyboard shortcut for updating a page or post?
- Add custom Attachment Display Setting for images
- Rewriting post slug before post save
- Apply the_title() filter in post & page title, but not in menu title
- How to Change Order of Posts in Admin?
- is it possible to get next_post_link
- Get post content by ID
- How to get post creation date?
- Update post counts (published, draft, unattached) in admin interface
- Function to execute when a post is moved to trash .
- How to get post ID of the current page/post inside a widget?
- add action only on post publish – not update
- How to display by default only published posts/pages in the admin area?
- How do you add Read more … link to posts?
- How to make comments work for a post loaded per Ajax?