[wp-hackers] Help with including custom templates using variables

Gregory Lancaster greglancaster71 at gmail.com
Mon Aug 12 06:05:28 UTC 2013


I have a theme that I would like to include unique left-sidebar for some
posts.  The custom sidebar templates are formatted like
"left-sidebar-$tag", $tag being the taged posts I want this sidebar to show
up on.

How can I append the tag name using wp_get_post_tags to the end of the file
name?  I tried calling it within the string, no success.  I am still
learning php so if this is obvious I apologize - but any help would be
greatly appreciated!

Greg


More information about the wp-hackers mailing list