[wp-trac] [WordPress Trac] #21894: <!--more--> tag does nothing in secondary loops when is_single because of $more global
WordPress Trac
noreply at wordpress.org
Mon Apr 28 09:56:50 UTC 2014
#21894: <!--more--> tag does nothing in secondary loops when is_single because of
$more global
-------------------------------+------------------------------
Reporter: jeremyclarke | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: template
-------------------------------+------------------------------
Comment (by obenland):
Unfortunately, `setup_postdata()` is not context aware when it checks for
single, page, and feed. Passing the post ID gives some context, but it's
still not possible to check if it's called outside of the main query.
Refreshed patch sets `$more` to 0 or 1, as mentioned earlier. This should
cover most use cases. It doesn't work if the post in the custom query
happens to be the current post of the main query.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21894#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list