Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 134302

claybaby on "Just the Loop, please"

$
0
0

I built a nice html webpage. I'd like to include a wordpress blog within the page. I'd rather not build an entire new theme(yet). From reading codex I gather I should be able to create a wordpress installation in my root folder then include the loop in my index file like so:

<?php define('WP_USE_THEMES', false); ?>

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>

[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

The result is a page that loads up to the php then is blank below that. Also, all I did was add the above code and rename the file index.php. Was that wrong?


Viewing all articles
Browse latest Browse all 134302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>