WordPress Theme Directory: Generate URL Dynamically with PHP Code

by Data Wrangler on March 27, 2010

I can’t quite remember how to generate the theme directory with PHP – I’m usually off by a letter for some reason …

It’s of course very simple and I do it regularly when creating updates and custom coding, particularly in Thesis custom themes, because adding code in open hooks will NOT link to the the directory, but rather to the main directory structure unless you add this:

<?php bloginfo('template_directory'); ?>

I hope you find this in Google more easily than I  did because searching for the keyword — Theme — always seems to display results of WordPress theme sites and not to the URL structure to get to a theme directory.

Related posts:

  1. Adding a Blog Page to Thesis WordPress Theme
  2. Membership Directory Powered By Wordpress

Leave a Comment

Additional comments powered by BackType

Previous post:

Next post: