The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › Back End › Dynamic bookmarks for current page – WordPress
I’m working on wordpress…
and I want to show a bookmark category dinamically based on the current page name.
How to retrieve that? I think the way is to match the slug of the bookmark category and the page name. But I’m not good at php yet.
I’ve found a way to do it using conditional tags. But I have to track manually the id’s for each bookmark category and page.
wp_list_bookmarks( array ( 'category' => 43 ));
elseif ( is_page ( 323 ) ) :
wp_list_bookmarks( array ( 'category' => 36 ));
wp_list_bookmarks( array ( 'category' => 2 ));
I’ve searched on the wordpress.org forums and I’ve found 2 threads related. But none of those ‘snippets’ seems to work for me. And I don’t understand the syntaxis yet.
Dynamic Bookmarks for Current Category
Advanced Custom Bookmark Query