Timeline for is_single query calling the wrong stylesheets? [duplicate]
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 13, 2017 at 12:37 | history | edited | CommunityBot |
replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/
|
|
Jan 6, 2013 at 23:51 | comment | added | fuxia♦ | Okay, I made an update to my previous answer to show the difference. | |
Jan 6, 2013 at 23:47 | comment | added | Mihad Aiko | @toscho "pretty-little-liars" is the custom post type i have added 2 more custom post type "revenge" and "once-upon-a-time" Each post type has a different stylesheet for the archive, but the single post under each post type doesn't. Now using what you and chip suggested seems not be really working, It's calling the style sheet from once upon a time, for every single post under every CPT, and yes thats the correct slug. | |
Jan 6, 2013 at 23:38 | comment | added | fuxia♦ |
And you are sure 'pretty-little-liars' is the slug of that post?
|
|
Jan 6, 2013 at 23:33 | comment | added | Mihad Aiko |
@toscho i didn't place the enueing in the header i placed it in the functions.php if i use is_single( 'pretty-little-liars' ) it won't work i have tried that. Are you saying that if i call it in functions.php i don't need to call it in the header, because it doesn't work by just calling it in the functions or just in the header.
|
|
S Jan 6, 2013 at 23:24 | history | edited | CommunityBot |
insert duplicate link
|
|
S Jan 6, 2013 at 23:24 | history | closed | fuxia♦ | exact duplicate | |
Jan 6, 2013 at 23:24 | comment | added | fuxia♦ |
This is still the same error like in your last question: use is_single( 'pretty-little-liars' ) , NOT is_single() == 'pretty-little-liars' . And enqueuing the stylesheets is enough. Don not print them manually into the header file.
|
|
Jan 6, 2013 at 23:18 | history | asked | Mihad Aiko | CC BY-SA 3.0 |