A A A

Please consider registering
guest

Log In Register

Login form protected by Login LockDown.


Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Different Archives for Standard Posts
April 20, 2008
7:09 am
Market Admin
Admin
Forum Posts: 5731
Member Since:
March 16, 2008
Offline

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_header(); ?>
<?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('&laquo; Previous Page') ?>
</div>
<div class="right">
<?php previous_posts_link('Next Page &raquo;') ?>
</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_header(); ?>
<?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('&laquo; Previous Page') ?>
</div>
<div class="right">
<?php previous_posts_link('Next Page &raquo;') ?>
</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).

April 20, 2008
7:13 am
Market Admin
Admin
Forum Posts: 5731
Member Since:
March 16, 2008
Offline

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.

August 2, 2012
6:11 pm
FlyingChangeWebs
Maine
Member
Forum Posts: 71
Member Since:
January 26, 2011
Offline

I'm looking to do this – have archives formatted like regular blog. But I notice the date is 2008 and it refers to "Market Plus". Is there an updated procedure?

August 2, 2012
8:46 pm
Market Admin
Admin
Forum Posts: 5731
Member Since:
March 16, 2008
Offline

Sorry I can't really help with that one. That's way before my time. I'm not even sure of what "Market Plus" is. Maybe a very early or off-shoot version. Don't really know anything about it.

August 2, 2012
10:11 pm
FlyingChangeWebs
Maine
Member
Forum Posts: 71
Member Since:
January 26, 2011
Offline

Using WP Category Archive worked for the sidebar (so it only includes posts and not products) AND took care of this issue.

Forum Timezone: UTC 0

Most Users Ever Online: 129

Currently Online:
18 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

icy1: 2636

wreed06: 175

laurie390: 169

boutiqueelliette: 154

StitchTek Services, LLC: 144

yiorgos: 127

Member Stats:

Guest Posters: 455

Members: 2428

Moderators: 1

Admins: 1

Forum Stats:

Groups: 1

Forums: 4

Topics: 3996

Posts: 18679

Newest Members: tronparts, Alexar, uktrading, Dragonsglass, linda@mcnallys.net, granthughes

Moderators: Market Admin (5731)

Administrators: Market Admin (5731)

Market takes e-commerce to the next level with an easy to use, quick setup platform. Learn more or take the tour.