Replace post_meta() with a template_part #2

staydecent opened this Issue Oct 27, 2011 · 5 comments


None yet
2 participants

staydecent commented Oct 27, 2011

Reusable pieces of a theme (mostly markup) should utilize

Allows for proper child theme's as well.


nathansh commented Oct 28, 2011

Are you able to put template_part files in in sub-directories? I don't see that in the documentation. get_template_part seems like it'd be a good idea, but I like separating things out and keeping my folders tidy.


staydecent commented Oct 28, 2011

Yup, should work fine using the $slug param: get_template_part('folder/file');



nathansh commented Oct 28, 2011

Hmm, doesn't seem to work so smoothly like that. It should, but it doesn't seem to...


nathansh commented Feb 22, 2012

I'm going to move to keeping template parts in a partials subfolder under includes, but I'm going to wait to move to get_template_part() until WordPress allows you to specify a directory, which I'm sure is only a matter of time.

nathansh closed this Feb 22, 2012


staydecent commented Feb 22, 2012

Good decision. Looks like it should be added before 3.4 comes out:

@nathansh nathansh pushed a commit that referenced this issue Apr 3, 2015

Nathan Shubert-Harbison Merged in jamie (pull request #2)
Updated readme with project setup notes.

@nathansh nathansh pushed a commit that referenced this issue Apr 20, 2015

Nathan Shubert-Harbison Merge pull request #2 from eriku/master
Added menu_item_parents = [] variable to sub_menu.php to stop array error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment