Archived topic
Simple CSS - PostBox GP
5 replies · Started by Jean Paiva on September 25, 2016
Hey Tom, I was using Simple CSS today and I had this insight of suggestion.
On Simple CSS screen we have three postbox (GeneratePress, Customizer and Tips). I suggest to check to see if GP is installed before printing GeneratePress postbox.
I think that this information is irrelevant if you are already using GeneratePress (or any child).
Here's my humble solution: https://gist.github.com/JeanPaiva/120a4013c764dab94c8f6b7436c27a14
Great idea, Jean! Thanks! :)
Updated on GitHub: https://github.com/tomusborne/Simple-CSS
Awesome! Liked your direct/faster way for checking GP.
For some reason wp_get_theme()->template doesn't always = generatepress in all cases. Super strange but something I struggled with a couple years back.
Good to know this strange stuff. Your solution is indeed better, since GP Version is already in memory and wp_get_theme return full object that we don't need.