f4lieson
Member
Posted 2 years ago #
I want to have a page that I can include in my website with only published articles on it. AKA - (default theme) no nav on the right, no header, no surrounding boarder, etc.
How do I do this? Is there a simple page I can simply include in an iframe or do I have to edit it into a style?
Just load up WordPress (include wp-config.php) and then treat your PHP page like a WordPress theme (make a Loop). No need to deal with themes or anything like that.
f4lieson
Member
Posted 2 years ago #
what do you mean by make a loop?
f4lieson
Member
Posted 2 years ago #
I have no idea how wp works, I just installed it and have been messing around trying to use it how I want.
so in my website I should include wp-config.php, but something else too - that just creates the connection to the db.
I guess I just don't understand what you mean by 'treat your php page like a WP theme (make a loop)'.
Is there a doc somewhere (that I couldn't find) explaining how to do what I want to do?
You need to click on the links provided by Moshu and I. That's the documentation.
f4lieson
Member
Posted 2 years ago #
Yeah, you guys posted that as I wrote my post.
http://www.cpsigmapi.org/new2/intro.php
<?PHP include '../new/wordpress/wp-config.php';?>
<?php define('WP_USE_THEMES', false); get_header(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php endwhile; else: ?>
<?php _e('Sorry, no posts matched your criteria.'); ?>
<?php endif; ?>