Timeline for Issues with if, else, and elseif statements
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 13, 2018 at 19:09 | vote | accept | lushiris02 | ||
Dec 13, 2018 at 19:09 | comment | added | RiddleMeThis | No problem. I added a little more info on creating your own body class as well. Good luck. | |
Dec 13, 2018 at 19:08 | history | edited | RiddleMeThis | CC BY-SA 4.0 |
added 405 characters in body
|
Dec 13, 2018 at 19:02 | comment | added | lushiris02 | Yes - I was just searching for that. I think the plugin the other developer installed is mucking things up. I think I'm going to have to remove that and properly declare other templates for the posts to get the right classes. Really appreciate your help. | |
Dec 13, 2018 at 19:00 | comment | added | RiddleMeThis | Are you sure there isn't already a specific class on the body for that template? | |
Dec 13, 2018 at 18:56 | comment | added | lushiris02 | That list of IDs is for specialty products which is a major change for another product like that. I'd be surprised if we add even just one in the next five years. Is there a way to add a specific class that would get added to the body that I could declare in that product-specialty.php template? | |
Dec 13, 2018 at 18:52 | comment | added | RiddleMeThis | Maybe I am missing something, won't you still have to maintain a list of pages using your conditionals? For example: is_single(893,892,843,895,894,896). Your best bet would be to find or create a class that is unique for each section or template used. Then you wouldn't have to keep track of specific pages, just templates used. Can you provide a few links to the different types of pages? | |
Dec 13, 2018 at 18:47 | comment | added | lushiris02 | So unfortunately, I have over 100 products and then 70+ other pages, so trying to write out each one seems impractical, especially since we'll need to add new products (but not these specialty products that are referenced above) and locations all the time (both custom post types). Another issue is that we do have some jQuery so that when transparent, it goes to the red background on scroll - it's a sticky header. I do like the elegance of your solution, just not sure how to implement at this scale. | |
Dec 13, 2018 at 17:19 | history | edited | Tom J Nowell♦ | CC BY-SA 4.0 |
added 15 characters in body
|
Dec 13, 2018 at 17:09 | history | answered | RiddleMeThis | CC BY-SA 4.0 |