Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_category_link [ WordPress Function ]

get_category_link ( $category )
Parameters:
  • (int|object) $category Category ID or object.
See:
Returns:
  • (string) Link on success, empty string if category does not exist.
Defined at:



Retrieve category link URL.

Source


<?php
function get_category_link$category ) {
    if ( ! 
is_object$category ) )
        
$category = (int) $category;

    
$category get_term_link$category'category' );

    if ( 
is_wp_error$category ) )
        return 
'';

    return 
$category;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics