<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>Seriously? </DIV>
<DIV> </DIV>
<DIV>You do not get the concept of having a blog loop NOT on the home/landing
page ?</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=chip@chipbennett.net
href="mailto:chip@chipbennett.net">Chip Bennett</A> </DIV>
<DIV><B>Sent:</B> Friday, September 13, 2013 7:28 PM</DIV>
<DIV><B>To:</B> <A title=theme-reviewers@lists.wordpress.org
href="mailto:theme-reviewers@lists.wordpress.org">Discussion list for WordPress
theme reviewers.</A> </DIV>
<DIV><B>Subject:</B> Re: [theme-reviewers] Feedback on use of query_posts please
-Badidea?</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV dir=ltr>There are many ways to implement a custom front page. The key
points here are:
<DIV> </DIV>
<DIV>1) Not to mis-use index.php as anything other than the default fallback
template file</DIV>
<DIV>2) To incorporate/respect settings -> reading, front page displays/front
page/posts page</DIV>
<DIV>3) To incorporate/follow the Template Hierarchy</DIV>
<DIV> </DIV>
<DIV>A template-blog.php is almost always going to be _doing_it_wrong(), because
when the user sets the front page to display a static page, and assigns a page
to display the posts page, WordPress is never going to use template-blog.php to
display that page. It's always and only ever going to use home.php, falling back
to index.php.</DIV></DIV>
<DIV class=gmail_extra><BR><BR>
<DIV class=gmail_quote>On Fri, Sep 13, 2013 at 10:23 PM, Zulfikar Nore <SPAN
dir=ltr><<A href="mailto:zulfikarnore@live.com"
target=_blank>zulfikarnore@live.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV>
<DIV dir=ltr>I think I know where Chip is coming from.
<DIV> </DIV>
<DIV>front-page.php conditionally calls index.php when user has Settings
>> Reading set to latest posts and if they have the settings to static
page then front-page calls the whatever-you-want-on-front.php right?<BR><BR>
<DIV>
<HR>
Date: Fri, 13 Sep 2013 22:14:31 -0400
<DIV>
<DIV class=h5><BR>From: <A href="mailto:chip@chipbennett.net"
target=_blank>chip@chipbennett.net</A><BR>To: <A
href="mailto:theme-reviewers@lists.wordpress.org"
target=_blank>theme-reviewers@lists.wordpress.org</A><BR>Subject: Re:
[theme-reviewers] Feedback on use of query_posts please - Badidea?<BR><BR>
<DIV dir=ltr>No, I think I have it exactly:
<DIV> </DIV>
<DIV>"<SPAN style="FONT-FAMILY: arial,sans-serif; FONT-SIZE: 13px">But I've
had a lot of requests for options to hide certain sections and one of them
<B>was the blog feed on front page</B>."</SPAN></DIV></DIV>
<DIV><BR><BR>
<DIV>On Fri, Sep 13, 2013 at 10:12 PM, Philip M. Hofer (Frumph) <SPAN
dir=ltr><<A href="mailto:philip@frumph.net"
target=_blank>philip@frumph.net</A>></SPAN> wrote:<BR>
<BLOCKQUOTE style="BORDER-LEFT: #ccc 1px solid; PADDING-LEFT: 1ex">
<DIV dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; FONT-SIZE: 12pt">
<DIV>Yeah, you’re not getting it.</DIV>
<DIV> </DIV>
<DIV>It’s not for the front page </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV><B>From:</B> <A title=chip@chipbennett.net
href="mailto:chip@chipbennett.net" target=_blank>Chip Bennett</A> </DIV>
<DIV><B>Sent:</B> Friday, September 13, 2013 7:11 PM</DIV>
<DIV>
<DIV><B>To:</B> <A title=theme-reviewers@lists.wordpress.org
href="mailto:theme-reviewers@lists.wordpress.org" target=_blank>Discussion
list for WordPress theme reviewers.</A> </DIV></DIV>
<DIV>
<DIV>
<DIV><B>Subject:</B> Re: [theme-reviewers] Feedback on use of query_posts
please - Badidea?</DIV></DIV></DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV>
<DIV>
<DIV dir=ltr>index.php is NOT the front page template, and should not be
used as such. It is the default fallback template.
<DIV> </DIV>
<DIV>Use front-page.php for your front page template, and home.php for your
blog posts index template. Then all of your issues go away, magically.
:)</DIV></DIV>
<DIV><BR><BR>
<DIV>On Fri, Sep 13, 2013 at 9:48 PM, Zulfikar Nore <SPAN dir=ltr><<A
href="mailto:zulfikarnore@live.com"
target=_blank>zulfikarnore@live.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex">
<DIV>
<DIV dir=ltr>I'm using the index.php showing featured content at the top
followed by the blog feed - which works fine and I had planned to stick
with that. But I've had a lot of requests for options to hide certain
sections and one of them was the blog feed on front page.
<DIV> </DIV>
<DIV>template.blog.php is to open the option to still have a page with the
blog feed on it when the user has opted to hide them on the front.</DIV>
<DIV> </DIV>
<DIV>Long story short - user hides posts on front but still wants a blog
fed page and this is my attempt to fill that need.<BR><BR>
<DIV>
<HR>
Date: Fri, 13 Sep 2013 21:42:43 -0400<BR>From: <A
href="mailto:chip@chipbennett.net"
target=_blank>chip@chipbennett.net</A><BR>To: <A
href="mailto:theme-reviewers@lists.wordpress.org"
target=_blank>theme-reviewers@lists.wordpress.org</A>
<DIV><BR>Subject: Re: [theme-reviewers] Feedback on use of query_posts
please - Bad idea?<BR><BR></DIV>
<DIV>
<DIV>
<DIV dir=ltr>Why do you need template-blog.php when there is home.php for
exactly that purpose?</DIV>
<DIV><BR><BR>
<DIV>On Fri, Sep 13, 2013 at 8:22 PM, Zulfikar Nore <SPAN dir=ltr><<A
href="mailto:zulfikarnore@live.com"
target=_blank>zulfikarnore@live.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE style="BORDER-LEFT: #ccc 1px solid; PADDING-LEFT: 1ex">
<DIV>
<DIV dir=ltr>I've read around that using query_posts is bad but I've
seen many a themes using it and get away with it.
<DIV> </DIV>
<DIV>My case is I'm trying to put together a template-blog.php for
StrapVert and this is what I've come up with so far:</DIV>
<DIV> </DIV>
<DIV>
<DIV>add_filter('option_show_on_front', '__return_false');</DIV>
<DIV> global $wp_query;</DIV>
<DIV> query_posts(array(</DIV>
<DIV><SPAN style="WHITE-SPACE: pre-wrap"></SPAN> 'paged' =>
$wp_query->get('paged'),</DIV>
<DIV><SPAN style="WHITE-SPACE: pre-wrap"></SPAN> 'post__not_in'
=> get_option('sticky_posts'),</DIV>
<DIV> ));</DIV>
<DIV> </DIV>
<DIV> global $more; $more = 0;</DIV>
<DIV> get_template_part('index-blog');</DIV>
<DIV> $more = 1;</DIV>
<DIV>remove_filter('option_show_on_front', '__return_false');</DIV>
<DIV> </DIV>
<DIV> wp_reset_query();</DIV>
<DIV>wp_reset_postdata();</DIV></DIV>
<DIV> </DIV>
<DIV>But before I add these changes to the theme and submit an update
I'd like some feedback on "How Really Bad" is query_posts and can I "get
away" with the above?</DIV>
<DIV> </DIV>
<DIV>Thanks in advance,</DIV>
<DIV>Zulf
</DIV></DIV></DIV><BR>_______________________________________________<BR>theme-reviewers
mailing list<BR><A href="mailto:theme-reviewers@lists.wordpress.org"
target=_blank>theme-reviewers@lists.wordpress.org</A><BR><A
href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers"
target=_blank>http://lists.wordpress.org/mailman/listinfo/theme-reviewers</A><BR><BR></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV><BR>_______________________________________________
theme-reviewers mailing list <A
href="mailto:theme-reviewers@lists.wordpress.org"
target=_blank>theme-reviewers@lists.wordpress.org</A> <A
href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers"
target=_blank>http://lists.wordpress.org/mailman/listinfo/theme-reviewers</A></DIV></DIV></DIV></DIV></DIV></DIV><BR>_______________________________________________<BR>theme-reviewers
mailing list<BR><A href="mailto:theme-reviewers@lists.wordpress.org"
target=_blank>theme-reviewers@lists.wordpress.org</A><BR><A
href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers"
target=_blank>http://lists.wordpress.org/mailman/listinfo/theme-reviewers</A><BR><BR></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV></DIV></DIV><BR>
<HR>
<DIV>_______________________________________________<BR>theme-reviewers
mailing list<BR><A href="mailto:theme-reviewers@lists.wordpress.org"
target=_blank>theme-reviewers@lists.wordpress.org</A><BR><A
href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers"
target=_blank>http://lists.wordpress.org/mailman/listinfo/theme-reviewers</A><BR></DIV>
<DIV> </DIV></DIV></DIV></DIV></DIV><BR>_______________________________________________<BR>theme-reviewers
mailing list<BR><A href="mailto:theme-reviewers@lists.wordpress.org"
target=_blank>theme-reviewers@lists.wordpress.org</A><BR><A
href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers"
target=_blank>http://lists.wordpress.org/mailman/listinfo/theme-reviewers</A><BR><BR></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV><BR>_______________________________________________
theme-reviewers mailing list <A
href="mailto:theme-reviewers@lists.wordpress.org"
target=_blank>theme-reviewers@lists.wordpress.org</A> <A
href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers"
target=_blank>http://lists.wordpress.org/mailman/listinfo/theme-reviewers</A></DIV></DIV></DIV></DIV></DIV></DIV><BR>_______________________________________________<BR>theme-reviewers
mailing list<BR><A
href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</A><BR><A
href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers"
target=_blank>http://lists.wordpress.org/mailman/listinfo/theme-reviewers</A><BR><BR></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV>
<P>
<HR>
_______________________________________________<BR>theme-reviewers mailing
list<BR>theme-reviewers@lists.wordpress.org<BR>http://lists.wordpress.org/mailman/listinfo/theme-reviewers<BR></DIV></DIV></DIV></BODY></HTML>