Topic RSS
If you are using Market Plus, there is a good chance you want news post archives (ex: http://www.yoursite.com/category/news) to show in a standard blog format rather than a grid. Let's accomplish this right now.
First, head to Manage > Categories. You'll need to take note of the category id or id's of the categories you want to display in a normal format. (If you are using Wordpress 2.5, you'll need to hover over the category and watch the status bar to see what number is shows for "cat_ID=")
You can do this in multiple ways, but in this case we'll use the template hierarchy to create a custom template for the category with an ID of 1.
Let's take some of the code from archive.php for now…
<?php get_sidebar(); ?>
<div id="grid">
<!– Add your loop code –>
<div style="clear: both"></div>
<div class="navigation">
<div class="left">
<?php next_posts_link('« Previous Page') ?>
</div>
<div class="right">
<?php previous_posts_link('Next Page »') ?>
</div>
<div style="clear: both"></div>
</div>
</div>
<?php get_footer(); ?>
As you can see, this is a very stripped down version of the archive.php file. Where it says "Add your loop code", that is where you would place your Wordpress loop to display news posts in category 1 a specific was as opposed to item posts. Let's add a really simple loop for now.
<?php get_sidebar(); ?>
<div id="grid">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post1" id="post-<?php the_ID(); ?>">
<div class="page">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?>
</a></h2>
<?php the_content(); ?>
</div>
<div style="clear: both"></div>
</div>
<?php endwhile; else: ?>
<p>Sorry, no posts matched your criteria.</p>
<?php endif; ?>
<div style="clear: both"></div>
<div class="navigation">
<div class="left">
<?php next_posts_link('« Previous Page') ?>
</div>
<div class="right">
<?php previous_posts_link('Next Page »') ?>
</div>
<div style="clear: both"></div>
</div>
</div>
<?php get_footer(); ?>
Save that file as category-1.php. Upload it to your /wp-content/themes/market/ folder. Now access a new category url in your browser, and it should be displaying normally. (You'll need to tweak some css, but you get the idea).
Craig – In your case, open up your archive php file. Where the loop starts which should be right under <?php if (have_posts()) : while (have_posts()) : the_post(); ?> to where it ends (should be) <?php endif; ?>, copy everything between there and paste it into the “Add loop” comment in the code above. Save it as category-#.php. Now regular news posts should display like your current blog (you'll just need to add in the css).
Feel free to post your entire archive.php code in your original current new blog if you want me to pull it out for you.
And regarding date / time. See here.
Most Users Ever Online: 129
Currently Online:
9 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Member Stats:
Guest Posters: 447
Members: 2392
Moderators: 1
Admins: 1
Forum Stats:
Groups: 1
Forums: 4
Topics: 3315
Posts: 17769
Moderators: Market Admin (5583)
Administrators: Market Admin (5583)

Log In
Register
Home
Offline

