I'd like to insert some CSS on a specific post type's backend area. So not globally. I've found lots of ways to insert it everywhere, but can't figure out how you'd target posts only. Any ideas?
1 Answer
Just use the Page-ID class e.g. 123 and use plugin like Custom CSS. There you do:
.page-id-123 {
font-size: 100px; }
You may need to add a class as well if you want to style a certain object.
-
What page-id is shared across all posts of a certain type in the wp-admin area?Fluxian– Fluxian2021-12-15 12:33:34 +00:00Commented Dec 15, 2021 at 12:33
-
1this works for the frontend, it does not work for the backend, the question is for WP Admin2021-12-15 13:13:23 +00:00Commented Dec 15, 2021 at 13:13
ifcondition, is_single() or is_singular(), adding your enqueued code into the question would help understand how you are adding your style.