admin管理员组

文章数量:1304269

I need to check term slug, if slug do not have, not display:

 if(is_tax()){
  $permalink = get_home_url() ."/category" . '/' .$term_slug . '/' .$post->post_name;
}else{
  $permalink = get_home_url() ."/univer/". $post->post_name;
}

UPD:

I need get something like this:

when I click on post name in category, in browser should be url: domain/categoryname/postname

when I click on custom taxonomy, in browser should be url: domain/taxname/postname

for other pages like this: domain/custom_post_type/postname

本文标签: Check for the existence of term slug