Gets the links associated with category $cat_name.
$cat_namestringoptional
'noname'.Default:"noname"
$beforestringoptional
Default:''
$afterstringoptional
<br />.Default:'<br />'
$betweenstringoptional
Default:" "
$show_imagesbooloptional
Default:true
$orderbystringoptional
'id', 'name', 'url', 'description', 'rating', or 'owner'. Default 'id'.'rand' as the order will return links in a random order.Default:'id'
$show_descriptionbooloptional
Default:true
$show_ratingbooloptional
Default:false
$limitintoptional
Default:-1
$show_updatedintoptional
function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id',
$show_description = true, $show_rating = false,
$limit = -1, $show_updated = 0) {
_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
$cat_id = -1;
$cat = get_term_by('name', $cat_name, 'link_category');
if ( $cat )
$cat_id = $cat->term_id;
get_links($cat_id, $before, $after, $between, $show_images, $orderby, $show_description, $show_rating, $limit, $show_updated);
}
| Version | Description |
|---|---|
| 2.1.0 | Use get_bookmarks() |
| 0.71 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_linksbyname