WordPress as template engine

You might be misunderstanding exactly what WordPress is and how it operates.

WordPress is a content management system, which in addition has it’s own API for working with the data held in the WordPress database as well as numerous other functions, actions and filters to help you achieve your desired result.

WordPress also has it’s own template and theme engine, which we commonly refer to as a “Theme” as a whole.

See:

…for more details on how the template hierarchy in WordPress works.

It’s also important to understand how to work with and manipulate queries in WordPress so you can obtain custom sets of data.

See:

…for more information on working with queries in WordPress.

To get pure, non-formatted content in WordPress, you need to refer to and use functions such as;

get_the_content(); instead of the_content();
get_the_excerpt(); instead of the_excerpt();

The latter functions in the examples above are passed through a string of formatting filters.

See:

…for more information on the types of functions WordPress uses to process its content and in addition what filters and actions you can use to hook onto if required.

Hope this helps to get you started.