Support

Account

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!