0
我想添加一個圖像字段到wp_term
表database
,我將它稱爲icon
。添加一個圖像字段到wordpress類
我想要那個包含URL
的圖像將成爲該類別的拇指。 我已經添加的字段中DB
,我也其插入到在管理面板的代碼:
<?php if (is_taxonomy_hierarchical($taxonomy)) : ?>
<tr class="form-field">
<th scope="row" valign="top"><label for="icon"><?php _ex(' Icon', 'Taxonomy Icon'); ?></label></th>
<td><input name="icon" id="icon" type="text" value="<?php if (isset($tag->icon)) echo esc_attr($tag->icon); ?>" size="40" />
<p class="description"><?php _e('The “icon” is the URL to the category icon. if it is an uploaded image it will be http://'.$_SERVER['SERVER_NAME'].'/wp-content/uploads/{your_file.name}.'); ?></p></td>
</tr>
<?php endif; // is_taxonomy_hierarchical() ?>
的代碼示出了從database
內容,如果它是預先設定的,但犯規更新它。
什麼/我在哪裏添加,以便它也會更新DB
icon
字段?
謝謝。
和一小時後,它永遠在堆棧溢出檔案丟失。比9gag更快。 – 2012-03-26 16:55:14