WordPress – Retrieve blogroll links in PHP Array

WordPress Experts,

I am trying to retrieve all blogroll links in PHP array but not having any luck. I found function for retrieving in HTML code. Is there any way to retrieve list in array?

Read More

Thanks,
Mihir

Related posts

Leave a Reply

1 comment

  1. But of course. The get_bookmarks function will retrieve links from the dashboard’s Links section.

    Default arguments and use are as follows (taken from the above link):

    $args = array(
        'orderby'        => 'name', 
        'order'          => 'ASC',
        'limit'          => -1, 
        'hide_invisible' => 1,
        'show_updated'   => 0); 
    
    $bookmarks = get_bookmarks( $args ); 
    foreach ( $bookmarks as $bm ) { 
        // Do something exceedingly clever
    }