Jump to content

Replying to Setting Archive Page Products In The Center Of The Page

Post Options

  or Cancel

Topic Summary

Elise Alley

Posted 14 April 2014 - 09:32 AM

Happy to have helped, kswinehart!  Let us know if you have any additional questions.




Posted 12 April 2014 - 09:04 AM

NEVER MIND! It worked. ;) Guess it just took a few minutes to update.


Posted 12 April 2014 - 09:02 AM

I'm not sure what I'm doing wrong... Maybe I have the code in the wrong place in archives? Here is what I have:
<div class="loop-content">
<?php while ( have_posts() ) : // The Loop ?>
<?php the_post(); ?>

                                            <?php it_exchange_set_product( $post->ID ); ?>
                                             <div class="archive-featured-image">
                                             <?php it_exchange( 'product', 'featured-image', array( 'size' => 'thumbnail' ) ); ?> </div>

Then, I just add the css code to the end of the style.css, correct?

Elise Alley

Posted 11 April 2014 - 12:52 PM

Hey kswinehart,

This one is probably a little more complicated than just giving you the CSS.  I could do that, but the CSS would affect the image both on your archive pages and on your store page.

What would be best, would be to add a class to the featured image on your archive page.  So, still using the Twenty Eleven theme as the example like in the codex, I added a div to wrap around the featured image.

<div class="archive-featured-image">
<?php it_exchange( 'product', 'featured-image', array( 'size' => 'thumbnail' ) ); ?>

So it looks like this overall:

Screen Shot 2014-04-11 at 1.36.10 PM.png

You can use a div or span, however you'd like to set that up, just so that you have a class unique to the featured image on your archive page.

Then, for the CSS, you'd add this:

.archive-featured-image {
margin: 0 auto;
width: 150px;

I used archive-featured-image for my class name, but you can use whatever you'd like.  

That should do the trick for you though.  Give that a try and then let me know if you have any additional questions.




Posted 10 April 2014 - 08:46 PM

I was looking to fix the issue of adding photos to my products on the archives pages and it worked with this article:

However, now, the photos are to the left of the page and I cannot get them to center. Here's an example:


Review the complete topic (launches new window)