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]
- Stop WordPress Wrapping Images In A “P” Tag
- Best practices for localizing WordPress content?
- if the post has content
- Only show content before more tag
- I want to have my custom field use HTML, how do I do that?
- Get content from one page and show it on another page
- remove tags from the_content
- Where to hook into post 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?
- Get Content From Blog Page
- Show content after the first and second paragraph
- Host wp-content on other domain, much like a CDN
- Word limit in post_content after more tag
- WordPress REST API – JSON “Rendered” Content Incorrect
- How do I make certain areas editable?
- What server settings are required to import WordPress XML file
- Is there a way to trigger an automatic import of a WP backup on creation of a new WP multisite site?
- Modify the_content after the more tag
- Site content not showing
- How to just show first line of content
- Hiding posts and pages in panel
- Take excerpt of the content of the post and send it as the title to create new post
- Convert all youtube link to embed
- Testing for post title in ‘if/else’ statement returns no content
- wp_insert_post iframe missing
- Grabbing specific content
- What is the proper way to get contents of a page?
- Does is_user_logged_in() block search bots?
- Finding the paragraphs in content
- Output string using php printf
- Get the Page Content,without generating HTML
- content gets scrambled
- Conflicting post edit options under dashboard
- Disable external (3rd party) CALL (images,fonts..) in Dashboard
- Retrieve a specific number of words from post_Content
- Get the content inside shortcode and apply external function to it?
- Can somebody tell me how I am supposed to be using blogs.dir for network / MU sites?
- Why content_arr[‘extended’] removes paragraph tags?
- Hide specific content from excerpts
- 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?
- Missing content in Pages only
- Doctype printed on the page content
- Images are searched in the wrong path
- Remove Content Filter
- Main WordPress site with several flexible clones
- Post Format Default Content
- Export + Import = wrongly duplicated content
- Post titles below the post format content
- Show image on the left and content on the right using ul li
- What is the precendence of item types within WordPress
- How To Watermark Audio
- How can I display “read more” without any other post text?
- Problem with content – not loading
- What are the advantages/disadvantages of using jQuery DOM manipulation as opposed to PHP DOM manipulation?
- Content not shown on some older browsers and mobile devices (SGS3)
- the_content() returning null in one category only, even though there is content
- tabbed content box with different tabbed background images
- Excerpt vs content formatting woes
- Split the_content into two parts
- Page content not visible in backend
- add share buttons above my posts without plugins
- Body-only page for a 2-page form [closed]
- How to turn each phone number within the $content to a telephone link?
- the_content() Not Grabbing All Content
- 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
- Automatically adding a link to the next page link before ” tag in posts?
- Simple Math Quiz or Captcha to hide whois query form
- Split the content of the_content();
- highlight specific text in the content box
- 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?