Simple CSS – PostBox GP

Home Forums Support Simple CSS – PostBox GP

Home Forums Support Simple CSS – PostBox GP

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #229314
    Jean Paiva
    Developer

    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

    #229381
    Tom
    Lead Developer
    Lead Developer

    Great idea, Jean! Thanks! 🙂

    #229384
    Tom
    Lead Developer
    Lead Developer
    #229393
    Jean Paiva
    Developer

    Awesome! Liked your direct/faster way for checking GP.

    #229394
    Tom
    Lead Developer
    Lead Developer

    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.

    #229405
    Jean Paiva
    Developer

    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.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.