Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Return tag link
- // Argument: 'css' or array( 'css' ) or array( 'css', 'design' )
- function ozh_get_tag_link( $tags = array() ) {
- if( !$tags )
- return get_home_url();
- global $wp_rewrite;
- $tags = implode( (array)$tags, '+' );
- if( $perm = $wp_rewrite->get_extra_permastruct('post_tag') ) {
- // we have pretty permalinks
- return trailingslashit( get_home_url() ) . str_replace( '%post_tag%', $tags, $perm );
- } else {
- // default links eg http://bleh.com/?tag=bleh
- return trailingslashit( get_home_url() ) . '?tag=' . $tags;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement