Easy Digital Downloadsプラグインで、チェックアウト、領収書、その他のページを編集したいと思います。そのdocumentationとして
が、私は私の現在のテーマのフォルダ/ edd_templatesにそのファイルをコピーした/
は実は、私は2の異なるカテゴリ(ワークショップ、ソフトウェア)を持っていると私はのためにを異なるテーブルを表示する方法を探していますこれらのカテゴリのすべての1つ1つのチェックアウトページ。私は、問題は、私はワードプレスに語っているということだと思いますWordpress - テーマのカスタムタクソノミーフィルタ?
<?php
$args = array(
'post_per_page' => '-1',
'post_type' => 'download',
'tax_query' => array(
array(
'taxonomy' => 'download_category',
'field' => 'slug',
'terms' => 'workshop'
)
)
);
$my_posts = get_posts($args);
if ($my_posts) :
?>
// custom html table for first category goes here... //
<?php endif; ?>
<?php
$args1 = array(
'post_per_page' => '-1',
'post_type' => 'download',
'tax_query' => array(
array(
'taxonomy' => 'download_category',
'field' => 'slug',
'terms' => 'software'
)
)
);
$myy_posts = get_posts($args1);
if ($myy_posts) :
?>
// custom html table for second category goes here... //
<?php endif; ?>
しかし、それはチェックアウトページ、あなたがどのカテゴリに関係なく、両方のテーブルを示しています...
:
だから、私はこれを使用しようとしましたこれらのカテゴリに何かがある場合、これらのhtmlテーブルを表示するだけです。それらをフィルタリングしない...
どうすればこの問題を解決できますか?