Found a solution which is working.
Splitting the array like above just gives you the plain text so shortcodes wont work.
this works:
global $post;
$content = get_extended( $post->post_content ); //get the_content
$excerpt = $content['main']; //get the teaser part before more tag
$main_content = apply_filters('the_content', $content['extended']); //get part after more tag
echo $excerpt; //post teaser part
echo $main_content; //post main part
my head is smoking. too much for a beginner
and if you want to have
in your html use this:
echo wpautop( $main_content );
Related Posts:
- append_content help
- How to limit post content and remove image caption from it
- Change Content for Specific Page
- Replace full content with an excerpt
- How to make search and replace in content through php
- How to have a “clean” post content, for excerpt and social networks sharing
- the_excerpt() in content.php and get_template_part() in single.php
- Divide post content in three columns
- The post content just showing up text
- Best way to modify content from index.php to single.php?
- Scroll over to get definition [closed]
- Best practices for localizing WordPress content?
- Only show content before more tag
- Get content from one page and show it on another page
- remove tags from the_content
- What’s the Best Way to Structure a Multi-Content Blog?
- How to Handle Distributed Development Workflow
- How can I clear oEmbed caches for YouTube on posts as they are loaded
- Modify ‘Read more’ link adding a new class
- Recommended Books on WordPress for Management and non-Developers?
- Total word count for posts by one author
- Split content into multiple columns using more tag?
- Host wp-content on other domain, much like a CDN
- WordPress REST API – JSON “Rendered” Content Incorrect
- How do I make certain areas editable?
- Is there a way to trigger an automatic import of a WP backup on creation of a new WP multisite site?
- Site content not showing
- How to just show first line of content
- Take excerpt of the content of the post and send it as the title to create new post
- Convert all youtube link to embed
- wp_insert_post iframe missing
- What is the proper way to get contents of a page?
- Output string using php printf
- Get the Page Content,without generating HTML
- content gets scrambled
- Disable external (3rd party) CALL (images,fonts..) in Dashboard
- Retrieve a specific number of words from post_Content
- Why content_arr[‘extended’] removes paragraph tags?
- Is there a way to show only the text editor
- How to make author box like this & add after every post?
- Hardening wordpress: wp-content file permissions?
- Extract an embedded video from the content
- Extracting gallery images in WordPress 3.5 on index.php
- same wordpress, 2 domains
- Displaying latest Posts – fixed height – Excerpt vs. Content?
- How to retrieve text only from a post using WP CLI?
- Images are searched in the wrong path
- Remove Content Filter
- Main WordPress site with several flexible clones
- Export + Import = wrongly duplicated content
- What is the precendence of item types within WordPress
- Content not shown on some older browsers and mobile devices (SGS3)
- Excerpt vs content formatting woes
- Page content not visible in backend
- Body-only page for a 2-page form [closed]
- How to turn each phone number within the $content to a telephone link?
- How is WordPress changing the content markup?
- Changing theme removes page content in dashboard’s post main editor
- Website showing random code like texts in a post after pasting from MS Word
- Simple Math Quiz or Captcha to hide whois query form
- Split the content of the_content();
- qTranslate 2.5.28 and WordPress 3.3.1 issues [closed]
- How do i configure my content to show full posts?
- How to show content for posts of a specific category only
- What is the best practice to localize content? (Geographic not langauge)
- Duplicate content with incremental titles. How is this happening?
- why my urdu text is not aligned properly when written in wordpress blog post?
- Images over HTTPS endless issues – mixed content
- Remove pre and code tags from WordPress
- Content export, reinstall and content import
- How to parse any content which was added after the working out filter ‘the_content’
- Need help with invisible content block
- Is it possible to remove the content editor (RTF field) for a certain user / role?
- How to get the list of posts with empty content
- after setup_postdata, the_content() only displays text before the read more tag
- Retrieve content of page by URL Parameter
- I am not seeing any content within WordPress after migration?
- Need help for showing same front content page, search page and portfolio post page
- Expandable WordPress content (text) inside a post
- Add video tag to youtube link fron content
- How to get sort content by page id?
- How to embed PDF files inside content without media_send_to_editor?
- get_the_content within foreach not the loop
- Update content on the fly
- Visual Editor not working for user on multiple computers
- Migrate bbpress content to posts
- Where to place landing pages or files inside wordpress?
- Retrieve page content and pass to PHP?
- Built-in Method to Extract Embedded Video from Content
- Add read more to the_content
- Stripping tag from elements in post
- Single Loop With Dual Content Area
- How can you find and replace text in wordpress files on localhost xampp folders?
- TwentyThirteen – Footer overlapping content [closed]
- the_content() “crashes” for single pages
- Content disappearing when trying to edit
- How do I edit the data/content inside a wordpress theme?
- styling the contents
- Import Content into New Avada Live (Fusion Builder) Page
- Elementor article preview picture have different size