0
我有一个自定义分类创建分类学描述为纽带
// store
$book_label = array(
'name' => _x('stores', 'taxonomy general name'),
'singular_name' => _x('store', 'taxonomy singular name'),
'search_items' => __('Search in store'),
'all_items' => __('All store'),
'most_used_items' => null,
'parent_item' => null,
'parent_item_colon' => null,
'edit_item' => __('Edit store'),
'update_item' => __('Update store'),
'add_new_item' => __('Add new store'),
'new_item_name' => __('New store'),
'menu_name' => __('stores'),
);
register_taxonomy('stores', 'books',array(
'hierarchical' => true,
'labels' => $book_label,
'show_ui' => true,
'query_var' => true,
'rewrite' => array('slug' => 'stores')
));
//
商店现在可以使加入基于店名职位时所选择的网址我进入nameand在我正在输入URL的描述说明也是自动选择的。
<?php
$link = term_description('', get_query_var('stores'));
if($link != '') : ?>
<div class="click"><a href=<?php header('Location' .$link); ?>> BUY </a></div>
<?php endif; ?>
,但在前端的URL既不显示也不重定向太.... PLZ指导我要去的地方错了
需要添加更多信息。例如,我不知道'term_description'和'header'是什么。没有这些知识,就很难调试这些代码。 –
term_description函数我使用的基于http://codex.wordpress.org/Function_Reference/term_description – user3117694