New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the loop on single.php and page.php appears unnecessary. #301
Comments
|
Hmm, looking at the code behind |
I'm always in favor of removing code where it makes sense. Looking at |
I prefer to use the standard Loop in all singular templates in _s. The code suggested above is what we refer to as a "partial loop" and really causes issues in other queries on the page. Historically this has appeared in a couple of the Default themes and has been fixed right away. Please see the following ticket: https://core.trac.wordpress.org/ticket/18794 |
Sweet, thanks for the heads up @mfields! |
No Problem! |
Is it for consistency that we include a while conditional around the loop on single/page.php?
https://github.com/Automattic/_s/blob/master/single.php#L13
If there is no post than they'd be redirected to the 404.php so to me it seems unnecessary. Also on a single/page there shouldn't be instances of more than one post without a custom query. I'd change this to an if conditional or remove it entirely like so:
Curious on the thought behind the current decision before I submitted a PR.
The text was updated successfully, but these errors were encountered: