Replying to Query Exchange Category & Image For Builder Extension
Posted 21 May 2014 - 11:18 AM
Posted 20 May 2014 - 01:40 PM
the first line of the code as instructed in the codex article should go after the line that says the_post()
Posted 20 May 2014 - 09:50 AM
No luck. Here is the code I am trying (just the loop part of the functions.php file for the extension): http://pastebin.com/Nr9f5b8M
Posted 20 May 2014 - 09:39 AM
This query brings in ALL exchange products (regardless of category).
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts( 'post_type=it_exchange_prod', '&paged=$paged' ); ?>
This query narrowed the posts to the category I needed.
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("it_exchange_category=rug-display-combo&post_type=it_exchange_prod&paged=$paged"); ?>
So glad it works now! Your help is appreciated.
Posted 20 May 2014 - 06:41 AM
this (red) part of code doesn't seem correct, what do you try to accomplish?
Can you take that out, and try again?
To select a category, you can use the "category name" parameter, see http://codex.wordpress.org/Function_Reference/query_posts#All_Posts_in_a_Category
Posted 19 May 2014 - 01:07 PM
Posted 16 May 2014 - 02:54 PM
1. My above referenced query does not single out the Exchange Category. Instead, it shows all of the exchange products. If done correctly, only the first post on this page should show (Kimberly Kuhn Rug).
2. The product image isn't showing. Can you apply the FAQ instructions you referenced to an extension rather than a archive/category page?
Posted 16 May 2014 - 01:59 PM
I'm not sure know what your question is. You said you can get the layout to display, correct? Are you not able to pull in the products?
Unfortunately, there are known issues with Exchange and Builder Views. That shouldn't stop the products from being pulled display, just how they are displayed.
As for the product images, they won't display on category pages by default. You will need to edit your archive.php (or category.php file, depending on your theme): http://ithemes.com/codex/page/Exchange_FAQs:_How_Do_I_Show_the_Product_Featured_Image_on_Archive/Category_Pages
If you can clarify the issue you're having, we'll do our best to help you out.
Posted 16 May 2014 - 12:29 PM
I can get the layout to display all Exchange products using this query in the extension functions.php file:
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("it_exchange_category&tag_ID=7&post_type=it_exchange_prod&paged=$paged"); ?>
I have tried different combinations of the query but keep hitting a brick wall. Also, the product image is not appearing.