2017-02-24 86 views
0

我想列出產品woocommerce作爲warungssl ..所示爲:產品名稱,正常價格,折扣價格,某些屬性,鏈接或按鈕導致產品詳細信息頁面,和一個鏈接或按鈕車。創建自定義佈局產品清單woocommerce

在哪個文件,我應該改變腳本代碼,我不知道如何來顯示多個屬性。

注意: 1.要(發佈,驗證和網站封印)我將調用屬性 數據。我不明白劇本的障礙。 2.我使用的WordPress主題波爾圖 3.以下的實例是屬性

也許它可以讓我知道,我必須改變文件的位置。

回答

0
please go to here : wp-content\plugins\woocommerce\templates\archive-product.php 
or 
please go to here : wp-content\themes\porto\woocommerce\archive-product.php 


and put following code: 
<?php 
global $product; 

$greenbar = $product->get_attribute('greenbar'); 
$issuance = $product->get_attribute('issuance'); 
$mobile_friendly = $product->get_attribute('mobile_friendly'); 
$san_support = $product->get_attribute('san_support'); 
$site_seal = $product->get_attribute('site_seal'); 
$validation = $product->get_attribute('validation'); 
$warranty = $product->get_attribute('warranty'); 
?> 
+0

謝謝回覆:) –