seems when i add the following using wpautop
to the output it resolves the problem. i would love to know from someone smarter than myself why this fixes it. why when we just use the_content
the p tags are included, but when we use get_extended
do the p tags get removed?
$content_arr = get_extended ( $post->post_content );
if( strpos( get_the_content(), '<span id="more-' ) == true ) {
echo wpautop($content_arr['main']);
echo '<div class="morecontent">'. wpautop($content_arr['extended']).'</div>';
}
else {
the_content();
}
Related Posts:
- the_content() Not Grabbing All Content
- Get content from one page and show it on another page
- Stop WordPress Wrapping Images In A “P” Tag
- Strategy for handling hierarchical pages with empty parent content
- Why does `url_to_postid` return 0 when testing `page_for_posts` Page?
- Testing for post title in ‘if/else’ statement returns no content
- $post object is null
- When paginating a Page with the tag, how can the 2nd and subsequent page styles be customised?
- Uppercase first sentence in every post
- Add Word Limit to Posts
- Show the content that is after the excerpt using child theme
- How do I do a page break?
- disable Tab post on nav-menus page (Admin)
- is_page Funtion for Posts ?
- The_excerpt() doesn’t parse – how to change that?
- WordPress 302 Redirect to Random Product/Post/Page
- Preview page/post revisions without overwriting current content
- Adding if statement into the_content()
- why my urdu text is not aligned properly when written in wordpress blog post?
- WordPress Sticky Post Count “Fix” Breaking Pagecount by 72 pages!
- How do I set content in my pages so that it remains permanent while blog posts are added below?
- Show only top 3 posts from 3 categories in order on home page
- Get part of a page url
- How to use wp_editor(); in functions.php then retrieve content in the template
- Stripping tag from elements in post
- Insert Shortcode exactly at the end of the content
- What function does the loop of displaying posts?
- Automatically search and replace link in content (pages/posts)?
- how to limit edit_form_after_title hook to page and post edit only?
- How to call function within a page/post, to dynamically generate content?
- Create custom page in WooCommerce
- Change WordPress post-state in Admin Area
- Programmatically inserting page breaks
- Guest Author – How to modify my custom function code if the guest author URL will follow a particular pattern/format?
- how to show all post in my page-grid.php template page
- eBooks download website, page or post?
- Force update all posts in custom post type, no content changes
- Disable REST API for a user ROLE
- How can I extract the URL of a link from a post?
- Can I hide a specific post from latest posts page?
- Hide add new page button
- How to show post(excerpt) from specific category on wp page?
- Same content shared between multiple posts?
- custom post type grid with content in lightbox [closed]
- What is the proper way to get contents of a page?
- Get the Page Content,without generating HTML
- Getting current post ID in functions.php
- Modify Image Source With The_Content Filter?
- page.php showing loop of posts and not page content
- How to include the latest post of a specific category on a matching page
- post categories
- How to display the link (title) and thumbnail post?
- Integrate OpenStreetMap on WordPress
- What’s the best way to render Visual Composer in posts, not pages?
- Is there a way to specify an extra class for a post or page with no title?
- How to get a post’s content? [closed]
- “about us”, ” contact” sections should be article(post) or page in the simple small Business website?
- Why does a published post only displays the title and not the content in the site? [closed]
- Every second post different class in blog view
- Best Way to Add UnEditable HTML to Posts
- Get post meta retrieving wrong value
- Make ‘blog’ page show content as well as posts underneath it
- Can’t save WordPress post with “/etc/” in it
- Setting limit to posts or page creation
- Using Posts Like a Page
- Pagination for normal (standard) posts on a page with a custom loop?
- post/page content
- WordPress Architecture as a CMS – Posts & Pages
- Is it to possible to insert a page in the post depending on the category ofthe post
- How can I add a page that shows posts from a single category?
- Help on conditional statement to accompany wp_insert_post function please?
- Automatic duplicate/copy of post to a related page in WordPress
- Yoast breadcrumb URL shows category instead of the page
- how can i take wordpress post as embed?
- Replace Tag Keyword With Link Within Post Content
- Disable pagination in posts and pages
- How do I make it so that new posts within a certain category go into a certain page?
- How to change number of posts shown on homepage vs other pages?
- Add custom class to existing menu items from custom meta
- Allow users to create their own page/s
- some posts being displayed as pages
- Get post title by Alphabet
- Make Show Notes for Individual Podcast Episodes Easy to Find (multiple URL’s?)
- can’t post immediately
- Displaying only posts from a certain category on my custom page template
- How can I create a menu items from meta box based on users input
- Add default content to post (for specific category)
- Where are my posts linked to? I keep getting a Not Found Error, and I have no single.php page
- save_post not working
- wp trim function not working
- Custom post page has attributes of latest post [closed]
- WordPress “Posts Page” isn’t showing template dropdown
- Adding Count Post in Page
- How to have 2 posting pages on a blog
- How add class the_content();?
- change page name on page list
- Custom Post-Rename Function Does Not Function in WordPress 6.x
- Show Next/Previous without Link
- Filters do not work when there are multiple (one works)
- Edit Page button is gone