Hello, I would like to create a "featured" category that I can add certain products to and the featured products show up under "New Additions". It appears that the "New Additons" is showing all categories so I believe I need to change that ID to the new "featured" category ID or something similar. Most likely tell it to include just one category.
Could you please tell me where in the code controls this?
Thanks!
11:22 am December 10, 2009
graphical_force
Member
posts 29
2
Never mind, I changed the Top Level Product Category under the Market Theme Options. This seems to work.
4:24 pm December 10, 2009
Market Admin
Admin
posts 4728
3
Beware of changing your Top Level Product category to only one particluar product category. That may well mess up products outside of that particular category.
If you only want to show one category on the front page, then you'll need to hard code the value in there.
First, find out what the category ID number is of the category you want to show.
Then, open up your "index.php" file for editing.
On or around line # 46, you'll see the line:
<?php $my_query = new WP_Query('cat='.mkt_product_cats().'&showposts='.$mkt_options['mkt_index_thumbs_per_page']); while ($my_query->have_posts()) : $my_query->the_post();
Where it says
cat='.mkt_product_cats().'
You'll need to change this part to reflect the category ID number. For example, if you found the category Id number was 14, then it would look like this;
cat=14
Of course the rest of the line will remain the same.
Save the file.
5:17 am January 20, 2010
aitchy
Member
posts 7
4
Hi I can't seem to get this to work (I may be making an error in the code).
Could you type out the full line of code so i can see what it looks like?
3:42 pm January 21, 2010
Market Admin
Admin
posts 4728
5
The full line of code looks something like this:
<?php $my_query = new WP_Query('cat='.mkt_product_cats().'&showposts='.$mkt_options['mkt_index_thumbs_per_page']); while ($my_query->have_posts()) : $my_query->the_post();
I hope this helps.
FYI: If you're doing changes through the WP theme editor, then it may not be showing you the correct "index.php" file. The reason, is that there is another "index.php" file in the "phpThumb" folder of the theme. Right now, the WordPress editor hasn't figured out what to do if two of the same filenames exist — so it only shows one.
The workaround, is to just edit the root "index.php" file on your computer, and then FTP upload it.
12:35 pm January 22, 2010
aitchy
Member
posts 7
6
Actually I meant what the code should look like with the category ID number in it.
Regards.
1:05 pm January 22, 2010
Market Admin
Admin
posts 4728
7
Oh, ok..
Here's an example:
<?php $my_query = new WP_Query('cat=14&showposts='.$mkt_options['mkt_index_thumbs_per_page']); while ($my_query->have_posts()) : $my_query->the_post();