wp_list_bookmarks fails if argument is $varname
-
I am writing a very simple code to list links based on category passed read from meta data of a post. If I hard code the category in the wp_list_bookmarks funct, it works fine but when i pass as a variable, it fails and shows a blank screen. below is the piece of code.
<?php
$category = get_post_meta($posts[0]->ID, ‘Category’, true);
$album = get_post_meta($posts[0]->ID,’Album’,true);
echo ($category);
echo ($album);
if ($category == “MusicAlbum”)
{
echo (“inside if”);
wp_list_bookmarks(‘categorize=0&category_name=$album&’);
}
?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘wp_list_bookmarks fails if argument is $varname’ is closed to new replies.