[wp-trac] [WordPress Trac] #18561: Better Way to Insert Things Below Individual Posts
WordPress Trac
wp-trac at lists.automattic.com
Fri Sep 2 05:19:59 UTC 2011
#18561: Better Way to Insert Things Below Individual Posts
-------------------------+------------------------------
Reporter: jane | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.2.1
Severity: minor | Resolution:
Keywords: |
-------------------------+------------------------------
Comment (by johnjamesjacoby):
I think there are a few different approaches here. To summarize, the ideas
on the table are:
* Create a template tag to output the rest of a posts non-metadata.
[get_the_rest() + the_rest()]
* Create a template part hierarchy to compliment the existing
[http://codex.wordpress.org/Template_Hierarchy template hierarchy].
* Hook theme specific actions into !WordPress core functions, so code can
be executed within any !WordPress theme more predictably, regardless of
the theme. (This includes the before/after suggestions)
All of these are great ideas but only the template tag approach accurately
solves this particular problem. Functions are easy for people to remember
because they are native to PHP, unlike !WordPress action names which are
native to !WordPress. Functions that start with "the_" are the first thing
most people learn about !WordPress, so they are an easy addition in
moderation.
The next best approach is having a set of ''theme specific'' actions fire
at appropriate times in the page-load process. This is what most theme
frameworks already attempt to do, so clearly it's popular and functional.
!BuddyPress and !bbPress both already take this approach with their
default themes, and having a standardized set of !WordPress '''core theme
actions''' would be, in a word, awesome.
The ''get_template_part()'' and ''locate_template()'' tweaks also should
make their way into !WordPress core. These enhancements along with a set
of core theme actions are the plugin authors' holy grail to reliably piggy
backing any !WordPress theme without jumping through flaming hoops of
fearful incompatibility with thousands of awesome themes.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18561#comment:76>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list