• I am testing the WordPress software to use on my website as way for other specific users to post content without my help. I have gotten it to work just like I want it to except for one thing: the post_content isn’t stored in a html-friendly format. I’ve waded through the code to try to find the formatting function(s) but I haven’t had much luck finding exactly what does the magic.

    Is there an easy way to
    (1) call the formatting function on the SQL result OR
    (2) use WordPress software directly to print the post only (no fancy themes or wrappers) from within a PHP file?

    Thanks for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Some instructions here:

    http://codex.wordpress.org/Creating_a_Static_Front_Page#Integrating_WordPress

    for embedding WordPress elements in an external (i.e. non-WordPress) PHP document.

    Thread Starter swinneyj

    (@swinneyj)

    Well that’s close to what I’m talking about. I still need to know how to call the function that converts $np->post_content into something that the browser will dislpay correctly.

    Thanks again.

    I still need to know how to call the function that converts $np->post_content into something that the browser will dislpay correctly.

    I’ll assume you mean displays the post content with the auto-text formatting one gets used to in WordPress. You can do that like so:

    echo apply_filters('the_content', $np->post_content);

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Grab post content’ is closed to new replies.