template tags and code indentation
-
hi, maybe this question reveals that I’m OCD about code neatness, but…
I’m developing a theme and I always try to use very nead code indentation, so that nested divs and html elements are indented.
my problem is, when I call template tags like wp_list_categories() and wp_list_bookmarks(), it returns nicely indented code, but i can’t get it to start several tabs over so it matches my indentation.
so for example, i might call wp_list_bookmarks(); and I get
<li class="linkcat"><a href="#">Blogroll</a> <ul> <li><a href="http://wordpress.org/development/">Development Blog</a></li> <li><a href="http://codex.wordpress.org/">Documentation</a></li> <li><a href="http://wordpress.org/extend/plugins/">Plugins</a></li> <li><a href="http://wordpress.org/extend/ideas/">Suggest Ideas</a></li> <li><a href="http://wordpress.org/support/">Support Forum</a></li> <li><a href="http://wordpress.org/extend/themes/">Themes</a></li> <li><a href="http://planet.wordpress.org/">WordPress Planet</a></li> </ul> </li>but what i really want is
<li class="linkcat"><a href="#">Blogroll</a> <ul> <li><a href="http://wordpress.org/development/">Development Blog</a></li> <li><a href="http://codex.wordpress.org/">Documentation</a></li> <li><a href="http://wordpress.org/extend/plugins/">Plugins</a></li> <li><a href="http://wordpress.org/extend/ideas/">Suggest Ideas</a></li> <li><a href="http://wordpress.org/support/">Support Forum</a></li> <li><a href="http://wordpress.org/extend/themes/">Themes</a></li> <li><a href="http://planet.wordpress.org/">WordPress Planet</a></li> </ul> </li>so that it follows my indentation.
i’ve tried passing “\t\t\t” and what not through the various parameters, but I can’t usually effect more than just the title or maybe (in the case of bookmarks) the list items. i can never shift the whole thing over.
and it doesn’t matter how far indented my php call to the function is either.
any help?
The topic ‘template tags and code indentation’ is closed to new replies.