Support » Fixing WordPress » external page with list of category posts

  • I am trying to create a simplified version of my blog to be used for cell phones. I have created a simple html file in my root directory called mobile.php that lists the categories. Then you click on one category and it goes to a page that lists those pages sub-categories. Now what I want to do is, when a subcategory is clicked it will go to a page that lists the most recent posts in that subcategory. I can’t seem to figure out how to do this. for the page that lists categories this is what I have:

    ?php query_posts(‘category_name=canton-monday’); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    <?php if ( in_category(‘canton-monday’) ) { ?>
    <div class=”post-cat-three”>
    <?php } else { ?>
    <div class=”post”>
    <?php } ?>

    <!– Display the Title as a link to the Post’s permalink. –>
    <h2>“><?php the_title(); ?></h2>

    <!– Display the Time. –>
    <small><?php the_time(‘F jS, Y’); ?></small>

    <!– Display the Post’s Content in a div box. –>
    <div class=”entry”>
    <?php the_content(); ?>

    <!– Display a comma separated list of the Post’s Categories. –>
    <p class=”postmetadata”>Posted in <?php the_category(‘, ‘); ?>
    </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. –>
    Sorry, no posts matched your criteria.

    <!– REALLY stop The Loop. –>
    <?php endif; ?>

    I want to list the posts in the canton-monday category. But ti is not working. It just shows a blank page and no error message. Can someone send in in the right direction for calling the blog information from the root directory and then listing a simplified version of the posts(no stylesheets)?

  • The topic ‘external page with list of category posts’ is closed to new replies.