I know how to get a bookmark in wordpress by the bookmark id.
<?php $bookmark = get_bookmark(8); ?>
<a href="<?php echo $bookmark->link_url; ?>" target="_new">link</a>
How can I get it by its name instead of its id?
Thank you.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well apart from using the
$wpdbwith an SQL-query directly you could use thesearch-option ofget_bookmarks:But it searches not only the link_name field but also other fields: