カスタムフィールドで素材情報テーブル設置参考

カスタムフィールドで素材情報テーブル設置参考
[article]
type = text
size = 26
output = true
label =①素材名<br />【タイトル】13文字以下<br />

[kiiwaado]
type = text
size = 100
label = ②メタタグ・キーワード<br />

[company]
type = text
size = 50
label =③メーカー社名 </br>

[company-url]
type = text
size = 50
label =④メーカーURL<br />例:  http://exsample.com/  </br>

<table style=”width: 320px;” border=”1″ cellspacing=”4″ cellpadding=”6″ align=”left”><colgroup> <col span=”2″ width=”160″ /> </colgroup>
<tbody>
<tr>
<td style=”text-align: center;” colspan=”2″ bgcolor=”#333333″ width=”312″ height=”43″><span style=”font-size: medium; color: #ffffff;”><strong>YARN INFORMATION</strong></span></td>
</tr>
<tr>
<td bgcolor=”#333333″ width=”140″ height=”auto”><span style=”color: #ffffff;”>NAME</span></td>
<td width=”180″>[article]</td>
</tr>
<tr>
<td bgcolor=”#333333″ width=”140″ height=”auto”><span style=”color: #ffffff;”>COMPANY</span></td>
<td width=”180″><a style=”line-height: 19px;” href=”[company-url]” target=”_blank”>[company]</a></td>
</tr>
<tr>
<td bgcolor=”#333333″ width=”140″ height=”auto”><span style=”color: #ffffff;”>COMPOSITION</span></td>
<td width=”180″>Wool 52%
Acryl 48%</td>
</tr>
</tbody>
</table>

スポンサーリンク

テンプレートファイルの表示させたい場所に記入

<?php
echo do_shortcode(‘[cft format=”★” post_id=”‘.get_the_ID().'”]’);
?>