• Hi, I would like to make a sort of directory using pages and wp_list_bookmarks. My plan was to make some hierarchical pages with the same names as list categories. Then in the template, have wp_list_bookmarks display the bookmarks in the category that matches the page.

    so for domain.com/directory/category-A/

    the_title() resolves to ‘Category A’ which corresponds to the link category to display so in the template I would like

    <? php wp_list_bookmarks(‘category=the_title();’); ?>

    but it doesn’t seem to work. Could I do the following?

    <? php $cat_var=the_title(); wp_list_bookmarks(‘category=$cat_var’) ?>

    I should probably be using expression engine for something like this but that is too hard for me in other ways. i would like to learn WP. I’m a newbie at php.
    Any help or ideas on how to accomplish this is appreciated.

  • The topic ‘Passing variables as tag parameters’ is closed to new replies.