1799 posts
  • Has been a member for 5-6 years
  • Germany
  • Exclusive Author
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 5 000 and 10 000 dollars
  • Envato Studio (Microlancer) Beta Tester
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
BroOf says

This is one way to include the wp-load.php file as unisphere said. You’d just do something like this at the top of your style PHP file.
<?php //Setup location of WordPress
$absolute_path = __FILE__;
$path_to_file = explode( 'wp-content', $absolute_path );
$path_to_wp = $path_to_file[0];

//Access WordPress
require_once( $path_to_wp.'/wp-load.php' );

//Now continue with any WordPress suff...
?>

#your-custom-thing {
     color: #<?php echo get_option(‘color’); ?>;
}

Exactly what I was looking for! Thanks so much!

415 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 5-6 years
  • Exclusive Author
  • Grew a moustache for the Envato Movember competition
  • Bought between 10 and 49 items
  • Referred between 10 and 49 users
  • Portugal
unisphere says


Man those 3 first lines of code are much better than the way I’m doing it, hope you don’t mind I use them, they’re delicious :D
Have at it. :-) What are forums for, right?

Thanks man, appreciate it ;)

by
by
by
by
by
by