[wp-trac] [WordPress Trac] #39493: Include custom post type slug as body class
WordPress Trac
noreply at wordpress.org
Fri Jan 6 00:42:27 UTC 2017
#39493: Include custom post type slug as body class
-----------------------------+-----------------------------
Reporter: danielbachhuber | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-----------------------------+-----------------------------
Comment (by danielbachhuber):
Replying to [comment:2 SergeyBiryukov]:
> Previously suggested in #18118, wontfixed as an "antipattern".
For this thread, @ericlewis's
[https://core.trac.wordpress.org/ticket/18118#comment:11 comment]:
> I think this is an antipattern.
>
> Slugs are mutable by content editors. I've been bitten by implementing
what's suggested here and having clients change slugs, then they lose
styling on X page and not knowing why.
I don't think Eric's comment is consistent with WordPress' existing
behavior.
In the scenario I described initially, the template is loaded based on the
post slug. If the slug were to change, then the template would no longer
load.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39493#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list