Integration into non-wordpress site – Permalinks
-
Hey everyone,
I have successfully integrated a wordpress blog onto a non-wordpress site.
See here: http://arcmktg.com/blog.phpEverything works wonderfully, except I want to change my permalink structure(To postname), and when I do this I get an error…
“Sorry, no posts matched your criteria.”Here is the code I am using to display my blog:
<?php /* Short and sweet */ define('WP_USE_THEMES', false); require('blog/wp-blog-header.php'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- Test if the current post is in category 3. --> <!-- If it is, the div box is given the CSS class "post-cat-three". --> <!-- Otherwise, the div box is given the CSS class "post". --> <?php if ( in_category('1') ) { ?> <div class="post-cat-one"> <?php } else { ?> <div class="post"> <?php } ?> <!-- Display the Title as a link to the Post's permalink. --> <h2 style="padding-bottom: 8px; padding-left: 20px; padding-right: 20px;"><?php the_title(); ?></h2> <!-- Display the date (November 16th, 2009 format) and a link to other posts by this posts author. --> <p style="padding-bottom: 8px; font-size: 12px; padding-left: 20px;padding-right: 20px;"><?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?></p> <!-- Display the Post's content in a div box. --> <div class="entry" style=" font-size: 12px; padding-left: 20px;padding-right: 20px;"> <?php the_content(); ?> </div> <!-- Display a comma separated list of the Post's Categories. --> <p style="padding-bottom: 20px; padding-left: 20px;padding-right: 20px;" class="postmetadata">Posted in <?php the_category(', '); ?></p> </div> <!-- closes the first div box --> <!-- Stop The Loop (but note the "else:" - see next line). --> <?php endwhile; else: ?> <!-- The very first "if" tested to see if there were any Posts to --> <!-- display. This "else" part tells what do if there weren't any. --> <p style="padding-left: 20px;padding-right: 20px;">Sorry, no posts matched your criteria.</p> <!-- REALLY stop The Loop. --> <?php endif; ?>There must be an easy fix for this right? Right now I have to use the default permalink for my blog posts, and I would love to use /%postname%/ but I can’t figure out a way to do this. Can anyone help?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Integration into non-wordpress site – Permalinks’ is closed to new replies.