Home › Forums › Add-ons › Options Page › ACF With PHP Based Style Sheet › Reply To: ACF With PHP Based Style Sheet
This seemed like a good solution but for whatever reason I cannot get it going…
I have tried various permutations and still the variable is not being passed…
Not sure how to answer your question how am I calling it…did I not give enough information above?
Right now I am trying something like this and still no luck
<?php // For GSL
include("../../../../wp-load.php");
header('Content-Type:text/css');
?>
<?php
global $post;
$variable = get_field('lp_background', $post->ID); ?>
?>
.custom #landing_banner .wrapper { background: url('<?php $variable ?>') transparent no-repeat center top; background-size: cover; }
Are you able to provide a better code block using the actual fields name I am showing in my example?
Any help is appreciated!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.