After researching this, here is what works for me:
<?php
$paragraphAfter= 1; //show box after selected paragraph
$content = apply_filters('the_content', get_the_content());
$content = explode("</p>", $content);
for ($i = 0; $i <count($content); $i++) {
if ($i == $paragraphAfter) { ?>
<!-- START OF BLOCKQUOTE -->
stuff
<!-- END OF BLOCKQUOTE -->
<?php
}
echo $content[$i] . "</p>";
} ?>
Related Posts:
- Split Content and Gallery
- How can i display the content in plaintext
- remove tags from the_content
- the_content and wp_link_pages
- Add Incrementing ID to each paragraph in the_content
- Use the_content outside the loop
- get_the_content not working in loop?
- the_excerpt(), get_the_excerpt() and the_content() all killing “the Loop”
- Content/Excerpt length control for a specific loop?
- Combining the_excerpt with the_content
- the_content() seems to block my ACF-code
- Removing the_content() from the page
- How to make post content from each post display within the same div
- Loop after page content
- Only display videos and images in the_content() within loop
- Styling text and images in the_content()
- Cannot retieve the_content() and the_author() – both returning empty strings
- How is WordPress changing the content markup?
- Insert content above an embedded video inside Wordress’ php the_content
- Split Content and Gallery
- the_content() keeps repeating itself
- Echo Most Recent Sticky Post in Loop?
- Making a specific page wordpress compatable that is not index
- how to use custom loop in the_content filter
- change the_content images for different sizes (Desktop, tablet, mobile)?
- Have multiple loops on a page appear after/between page content
- Help with add_filter(‘the_content’, ‘some_function’) and multiple matches
- Single Loop With Dual Content Area
- How to add custom HTML markup and classes to the_content()?
- the_content() “crashes” for single pages
- Hide old posts each year
- How to display Yoast SEO meta description in archive template for each post instead of the_excerpt()? [closed]
- How to get Author ID outside the loop
- Why do themes rely on “The Loop”?
- How to place comments_template(); outside the loop?
- Endless loop with wp_insert_post and wp_update_post
- Hook into the loop via a plugin, and output something after every X post?
- Two custom loops, pagination, offset
- Access to Media Library
- Getting two wp_link_pages output
- post loop causes wp_users and wp_usermeta DB queries for each users
- Ajax loop refresh on click
- Run The Loop over array of post objects
- Enable infinite scroll on single.php [closed]
- Is get_posts() more efficient than The Loop?
- loop through all posts memory error
- How to retrieve “sticky” post outside the “loop”?
- code suddenly appearing from my tempate second loop
- Get post/page data outside the loop
- woocommerce get_price_html not pulling in correct price
- Trouble Formatting DateTime
- Order archive results by post id in custom taxonomy template
- How to fix pagination for custom loops?
- pre_get_posts for two loops on same page
- Modify the main loop to display current month / year
- Problem with displaying HTML content after in_array [closed]
- Loop for sticky posts
- Get author_id in wordpress
- Single.php different behaviour from admin to non-admin
- Array ids post to function have_post
- Can’t access PHP array inside script localization from javascript
- ACF – add a group inside a repeater [closed]
- Get post offset/posts page offset in single post page (outside the loop)
- First article : single column; Other articles : 2 columns
- get_comments with post_status ‘public’ retrieves NULL result
- Content Visibility for WordPress is not working (Drafts, public etc.)
- Generating a perfect loop
- I have broke my pagination, same posts on all pages (index.php)
- I need to display all post in onepage
- Filter existing hook using parameter and foreach loop
- Run “the loop” in a random order
- WordPress loop not working only on home page, works on all other pages
- Exclude category from get_the_category
- Search page loop banner image issue
- Video post format, extra content breaks video embed
- Strip from or something better?
- Why is my category post repeating twice
- Adding a featured image to a foreach WordPress loop
- Why would a completely normal loop give offset errors and maximum execution time errors?
- Avoid WP_Query’s duplicate posts with taxonomies
- How can I change how my tag pages display?
- Properly loop through and paginate page on each function call
- Get a Post Loop based on Logged in User information into a Shortcode
- Submit form for loop of products of the term with AJAX
- Last post in loop when even
- Customizer settings using “for” loop
- Repeat code, change variable?
- Foreach loop inside foreach loop?
- Ajax category pagination problem
- Unable to login + Redirect loop on mobile
- Variable not working in sidebar loop
- Combine Query and Select Database to create directory loop
- My custom query not detecting the correct category
- 2 loops in blog homepage
- The Loop for my theme with static front page is not working
- WordPress loop: Display if posts exist
- strange parse error when including a loop template within another template
- Previous Posts Link and Next Posts Link Show All The Same Articles?
- Showing ads after posts in home page
- Undefined variable: woocommerce_loop [closed]