March 27, 2012 at 4:07 pm #10772
Is there a way to shorten the title in the product slider in the homepage?
Thanks.March 27, 2012 at 5:01 pm #69342
to make my question more precise :)
i have a long titles for the products of my website,
example: Lavander Silk Standard Strip Tie
and i would like to shorten it to fit the theme design
example: Lavander Silk …
is there a way to do this on the product slider on the home page?
thanks againMarch 28, 2012 at 1:51 am #69343
Unfortunately not without adding the ability into the plugin/theme code. If you are interested in that, you could probably achieve the effect by adding a new custom field and then changing the product slider code to display that custom field instead of the post_title.
I’m not sure how this would impact the WooCommerce plugin however, but if you really need that look its probably your best route.
DevinMarch 28, 2012 at 7:09 am #69344
so your saying that the product slider of the home page is generated by the woocommerce plugin? Im not that good in php or jquery. ive been messing around the themes code already but cant find the source of the product slider. Can you direct me where to find the code on theme? thanks in advance.March 28, 2012 at 7:33 am #69345
and also i would like to add a product id below the title by displaying the sku field of the woocommerce plugin. big help is much appreciated.March 28, 2012 at 5:26 pm #69346
The home page slider is actually part of the theme files but adding a custom field to the products may have an impact on the actual WooCommerce plugin (it also may not).
The code that generates the shop slider for the Template Builder is in includes>helper-templates.php. You’ll need to add the fucntions to display the new custom fields here and the sku with whatever label you want for it.March 29, 2012 at 5:03 am #69347
I found the function responsible for the product slider but the there is no way to edit or add the custom field. it is stored in a variable $products.
$output .= “<div class=’container_wrap “.$avia_config.” template-shop shop_columns_”.$avia_config.”‘>”;
$output .= “<div class=’template-shop content shop_slider_$shop_slider’ data-interval=’$shop_autorotate’>”;
$output .= $products; // <<<<<<<< Products generated
if($shop_pagination == ‘yes’) $output .= avia_pagination();
$output .= “</div>”;
$output .= “</div>”March 29, 2012 at 9:54 pm #69348
I’m not sure where you should look from here. Its a bit out of the scope of support and I personally am not as intimate with the Woo Commerce integration. I’ll tag the thread for the other support crew to look at as they might have some suggestions to look at.
DevinMarch 31, 2012 at 4:53 am #69349
so the products are actually generated by woocommerce. hehe what a pain in the a** that putting some simple functionality gives me a big headache. anyways thanks for the help.March 31, 2012 at 12:07 pm #69350
You can try to use hooks to display your custom data. A list of all important hooks can be found here: http://www.woothemes.com/woocommerce-docs/codex/extending/hooks/
The topic ‘How to shorten the title in the product slider?’ is closed to new replies.