Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6718129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:55:59+00:00 2026-05-26T08:55:59+00:00

I have a page on my WordPress site and I’d like to break up

  • 0

I have a page on my WordPress site and I’d like to break up the body text after the 2nd paragraph with an <hr />(without adding it in the WordPress admin side).

Is it possible to crop my content after the 2nd </p>, add the <hr /> and then continue to export the remaining text?

So the resulting HTML could be:

<p>test1</p><p>test2</p><hr /><p>test3</p><p>test4</p>

I’m not sure where to start with this 🙁

Could someone point me in the right direction?

I thought using the_content_rss would do the trick, but there’s no real documentation on how I can achieve the above.

Many thanks for any pointers at all.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:56:00+00:00Added an answer on May 26, 2026 at 8:56 am

    I have received an answer for a very similar question by str here: Crop string after 2nd full stop.

    My eventual code looks like this:

                            <?php
                            $str = get_the_content();
                            $strArray = explode('</p>', $str);
                            $str1 = $strArray[0] . '</p> ';
                            $str2 = $strArray[1] . '</p>';
                            echo $str1;
                            echo '<hr />';
                            echo $str2;
                            ?>  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have wordpress a site with a customized login page, the problem is when
I have built a site in wordpress and the home page is really screwed
I have a wordpress site, and in the home page , there is side
I have a WordPress site (2.6.2) in which I have set the Home page
Is it possible to have a page like: www.site.com/page/ and show different templated versions
I have a wordpress site with a large number of pages, each page represent
I have a page in my Wordpress site that calculates post popularity and updates
I have created a wordpress site. The home page appears in the navigation menu
I have this function I created to give my wordpress site a body tag...
I have a one-page wordpress site. It uses pages and posts but is all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.