Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Dynamic CSS with Advanced Custom Fields

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #150283
    craiggrella
    Participant

    Chris,

    I’ve been playing with options pages on client sites and I’m running up against the ability to take custom data that might go beyond what the wordpress customizer lets me do easily. So i started using advanced custom fields, which is working well, but i’m still running into issues getting some of that data in templates, particularly he stuff that would go into a normal css file.

    I know the way the customizer does it is to add inline styles and then pump it back into the head, but i’m thinking that could get crowded for options pages that get hairy.

    I found this interesting post about writing dynamic css files from PHP files here: [http://www.designly.net/blog/custom-stylesheet-in-wordpress-with-advanced-custom-fields-and-the-acf-options-add-on/] (something you’ve also mentioned as a trick here – though in slightly different regard).

    So my question is this – is there a significant disadvantage to making custom css files on the fly with this method, over using the customizer or somethign that just throws styles into the head? Or is what’s covered in this short tut just poor practice overall? Seems like a hack to me, but thought I’d get your advice.

    Thanks.

    #243923
    Justin
    Participant
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.