[theme-reviewers] Rule Addition?

Edward Caissie edward.caissie at gmail.com
Sun Feb 3 17:12:00 UTC 2013


OT - Although I agree with Otto to a certain extent in finding a
consistency in that naming convention, I cannot help but think the
"standard-ish"-ness of the use of "content" may be driven more by copy and
paste techniques than an informed decision to use "content" as a template
name root.That being the case, I chose to use the theme slug as the
template root and consider it in equal standing as "content", "loop", or
any other "common" word/phrase ... and the idea of refactoring all of my
themes to use "content" just doesn't appeal to me (*grin*).

Edward Caissie
aka Cais.


On Sat, Feb 2, 2013 at 6:38 PM, Otto <otto at ottodestruct.com> wrote:

> On Sat, Feb 2, 2013 at 5:15 PM, Bruce Wampler <weavertheme at gmail.com>
> wrote:
> > Given that the templates are supposed to be loaded using
> get_template_part
> > anyway, maybe the functionality belongs there and no one would have to do
> > anything.
> >
> > Bruce Wampler
> >
>
> It would be nice if there was a sort of standardized "list" of template
> parts.
>
> For example, "content" is starting to be standard-ish. Jetpack
> specifically uses it in the Infinite-Scroll implementation.
>
> For the definition of it, I'd make it something along these lines:
>
> = Template Part Standard =
>
> Primary name: "content"
>
> Secondary name: post format (from get_post_format)
>
> Description: The content template part is the entirety of the post
> output that is inside "the Loop". This would be the main "div" or
> other container that gets the post_class() call added to it for the
> post classes, as well as everything inside it. Note that by moving
> this content into a template part, the context of the executing code
> would no longer be global, so commonly used variables like $post and
> similar would need to be declared as explicitly global at the
> beginning of the template part file for them to accessible.
>
> Example usage: In the Loop.
>
> while (have_posts()) : the_post();
>     get_template_part( 'content', get_post_format() );
> endwhile;
>
> Uses: The use of the content template part enables the content of a
> post to be generated from a separate file as well as by other plugins
> or code. So, for example, Jetpack's Infinite Scroll feature is capable
> of using the content part to generate the post content individually,
> allowing the posts to be sent to the page via javascript requests,
> thus enabling the infinite-scroll behavior. This method also allows
> for easy customization of the individual look of posts using various
> post formats, since content.php can be separated from
> content-quote.php or content-aside.php, for example.
>
> -Otto
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20130203/dd7829c7/attachment.htm>


More information about the theme-reviewers mailing list