Links per Page
-
I’m trying to add a set of links to the sidebar of my pages, however, each page has a unique set of links (for instance, the About page would have a set of links and the Contact page would have its own set of links).
The problem is that I have to create a new dynamic sidebar and template for each page which is troublesome and not ideal (or really an option) for a novice user (my client).
I have attempted a few plugins but all require their own unique dynamic sidebar (basically, I really only want one sidebar). I have also attempted to get into the php code of the sidebar.php and have use the list_bookmarks code and a custom field value (for the link category id) but can’t seem to get that to work. Here is the code below (the c2c_get_custom comes from the Custom Fields plugin):
<?php
$linkCategory = c2c_get_custom(‘Category’);
wp_list_bookmarks(‘category=$linkCategory’);
?>I may just have my php syntax wrong but if I can some how get the custom field value has a variable and list that in the wp_list_bookmarks category value, that would make my day.
- The topic ‘Links per Page’ is closed to new replies.