Search Results Page

eCommerce WordPress theme to create online shop with WooCommerce support
GK User
Wed Apr 08, 2015 7:50 pm
Search works great! However the results scale the images to a fullwidth page..they look huge and really bad. How can I edit the format of the search results page?
User avatar
Junior Boarder

GK User
Wed Apr 08, 2015 8:25 pm
Hi,

You can add i.e. the following css code:
Code: Select all
.search article figure.featured-image {
   width: 50%;
   margin: 0 auto 30px auto;
}
User avatar
Moderator

GK User
Sat Apr 11, 2015 8:26 pm
excellent! this works great but is there a way I can not have the "Product Short Description" Display on this page?
User avatar
Junior Boarder

GK User
Mon Apr 13, 2015 7:56 am
so, you want to display only title with images on search result page? Generally you can edit InStyle/content.php file and change this fragment:
Code: Select all
<section class="summary">
         <?php the_excerpt(); ?>
         
         <a href="<?php echo get_permalink(get_the_ID()); ?>" class="btn"><?php _e('Read more', GKTPLNAME); ?></a>
      </section>

into:
Code: Select all
<?php if (!is_search()) : ?>
      <section class="summary">
         <?php the_excerpt(); ?>
         
         <a href="<?php echo get_permalink(get_the_ID()); ?>" class="btn"><?php _e('Read more', GKTPLNAME); ?></a>
      </section>
      <?endif; ?>
User avatar
Moderator

GK User
Mon Apr 13, 2015 8:51 pm
ok,

I did that however it broke a few other things. On that page it removed the "Product Details" button. And then when I click the image on the product view page it has a few PHP errors looks like having to do with the variations:

Warning: Illegal string offset 'is_variation' in /home1/trendhip/public_html/wp-content/plugins/woocommerce/includes/class-wc-product-variable.php on line 349

Warning: Illegal string offset 'name' in /home1/trendhip/public_html/wp-content/plugins/woocommerce/includes/class-wc-product-variable.php on line 354

Warning: Illegal string offset 'is_taxonomy' in /home1/trendhip/public_html/wp-content/plugins/woocommerce/includes/class-wc-product-variable.php on line 393

Warning: Illegal string offset 'name' in /home1/trendhip/public_html/wp-content/plugins/woocommerce/includes/class-wc-product-variable.php on line 405
User avatar
Junior Boarder

GK User
Mon Apr 13, 2015 8:58 pm
Actually it looks like that error was from a mass .csv import I did. Any idea how to fix this?
User avatar
Junior Boarder

GK User
Mon Apr 13, 2015 9:44 pm
If you want to leave the button, try to change this condiiton to:
Code: Select all
      <section class="summary">
      <?php if (!is_search()) : ?>
            <?php the_excerpt(); ?>
      <?endif; ?>
         <a href="<?php echo get_permalink(get_the_ID()); ?>" class="btn"><?php _e('Read more', GKTPLNAME); ?></a>
      </section>

I have no idea how to fix te problem with csv import, maybe woocommerce support knows the answer.
User avatar
Moderator


cron