I can clearly see Posts and Projects page IDs when I load the page. Why are Posts and Projects not taking the code like Pages do?
You already answered your question in the 1st paragraph. Since you target using page-id, it only affects that page-id only.
On top of that, there is also the Specificity of selector involved too.
https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity
Try this code in Additional CSS section, it will make nav menu link in project page become black.
/* default is white, make it black */
.project-template-default #top-menu-nav .menu-item a {color: black;}
]]>
What I’m saying is that using the page id works for Pages only. The default menu font color for my site is white. But I some pages it needs to be black. So I get those page IDs and copy/paste the code then update the page ID number.
But for Projects, trying to target its page id doesn’t work.
I tried your code in various parts but it not having an affect.
Thanks,
AJ
]]>The project is a custom post content type, so it uses postid-xx
in <body>
class.
<body class="project-template-default single single-project postid-437">
So if you want to use id, just use .postid-437