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

  • Home
  • SEARCH
  • 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 8571983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:54:12+00:00 2026-06-11T18:54:12+00:00

First off I have gone through this link http://codex.wordpress.org/Integrating_WordPress_with_Your_Website . I cannot use this.

  • 0

First off I have gone through this link http://codex.wordpress.org/Integrating_WordPress_with_Your_Website. I cannot use this.

I am trying to get the latest post from a WordPress installation on a remote server I own. They share the same database server so that is where I am taking the post now and then brining it back into my PHP app. This all works.

What doesn’t work is the display. Before I was using nl2br to make new lines but this does not work right.

I have noticed that WordPress does some post-processing to add p tags to certain lines they consider should be paragraphs (not in uls or lis for example). They do this after grabbing the post from the DB (the p tags are not saved to DB).

I have tried to find out what post-processing they use in the source code but I have come up blank after finding the the_content function etc and where the $post var comes from but not finding the code I am looking for.

What post-processing function does WordPress use to add these paragraphs to make their posts look ok?

Edit

For regex or general PHP people here I am looking to change something like:

<em><a href="link">awesome link</a></em>
<h3>Awesome Head</h3>
lalalaalal
<ul>
<li>Awesome li</li>
</ul>

Into something like:

<p>
    <em><a href="link">awesome link</a></em>
</p>
<h3>Awesome Head</h3>
<p>lalalaalal</p>
<ul>
<li>Awesome li</li>
</ul>

Missing out tags that obviously should not have p tags around them like h and ul and li tags.

  • 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-06-11T18:54:13+00:00Added an answer on June 11, 2026 at 6:54 pm

    The easiest, fastest way: parse the latest post from the RSS feed. You’ll find all of the <p> tags automatically added for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First off, I have read through a list of postings on this topic and
I am trying to create a very basic sprite image. First off i have
First off, I'm aware this is a bad practice and I have answered many
I have two questions, actaully... First off, Why cant I do this: List<Object> object
First off, I will say i've spent 6 hours on this topic and have
First off, forgive me if this is a schoolboy question :) We have a
I have an emergency issue at hand. First off, yes, I realize this was
First off, I have a better method of dealing with this issue so it's
First off I apologize... I have posted this question before, but I did a
First off is there one? Or would I have to use javascript? I'd like

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.