Custom Fields in a dynamic css file using .php
-
Hi, I’m doing an experiment.
I’m trying to pass the custom fields of a post to a post-css.php file that uses header(“Content-type: text/css”); that lists the content as css but seem to be having a problem somewhere. I’m linking to this file in my header.php as an external style sheet link but I’m not getting any results.
The custom fields I’m working with specifically hold valid css syntax.
Whenever I just plop the custom fields into the head it works but I really wanted to keep my head tidy.
The best I can figure, the issue has to do with the get_post_meta not having a proper $post_id to pull the $key & $value from since it is it’s own secluded page that dynamically creates the content.
I’m sure I did a terrible job explaining my problem, but if anyone has any ideas of how to implement a quick, easy, and effective solution then I’d be all ears. I’m not all that good at php so if it gets deep can you explain the process/logic please?
Thanks a load.
Matthew Simo
- The topic ‘Custom Fields in a dynamic css file using .php’ is closed to new replies.