1

I have no knowledge about WordPress. However, I want to fetch and display the latest posts of a WordPress site in an application window.

One way to do so is to use the RSS feed. However, this requires parsing and displaying the data in my application.

So I would like to use an HTML view and display the data directly, but with no header and sidebar. Is there a way to remove the menu bars and get the plain vanilla post data?

Using something like query parameters or something similar?

1

A good place to start learning how this stuff works in WordPress is to get familiar with the WordPress Documentation which is lovingly referred to as The Codex.

The answer to your question will become very clear once you understand how The Loop works.

If I am understanding your question clearly enough I think that what you are looking for is something like this:

<?php 
if ( have_posts() ) {
    while ( have_posts() ) {
        the_post(); 
        //
        // Post Content here
        //
    } // end while
} // end if
?>

Much of WordPress's magic happens within that loop, however, you can also get information onto the screen without being inside that loop. If you decide to fetch information outside of the loop, you will need to have specific information like the Post ID readily available.

I hope this helps guide you in the right direction.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.