我想顯示類別中產品的下拉菜單。如何在Woocommerce 2.5.2中顯示「在wordpress頁面中下載類別產品」
<select>
<option value="CODE HERE">Volvo</option>
</select>
所以根據WordPress的編碼..
<?php
// The Query
$the_query = new WP_Query($args);
// The Loop
if ($the_query->have_posts()) {
echo '<ul>';
while ($the_query->have_posts()) {
$the_query->the_post();
echo '<li>' . get_the_title() . '</li>';
}
echo '</ul>';
} else {
// no posts found
}
/* Restore original Post Data */
wp_reset_postdata();
好了,所以我進一步調查,我希望做根據https://developer.wordpress.org我使用店面子主題被稱爲單一的頁面模板NOVA WP。
爲了使這個「單頁模板」我複製page.php文件,並將其重命名爲page-buildit.php
這是Mypage中,我實際上是在編輯代碼。我沒有複製代碼,但事實證明空白
找到這個:WooCommerce: Create a shortcode to display product categories 但我的未知是我們不能再這樣做新的wordpress版本。
我在哪裏輸入此內容? – ingalcala
儀表板>產品>分類 –
我不明白。我的主要目標是:在Wordpress頁面中顯示不在Wordpress模板中的類別列表。 – ingalcala