Skip to content

Instantly share code, notes, and snippets.

@sbrajesh
Created March 5, 2013 00:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbrajesh/5086969 to your computer and use it in GitHub Desktop.
Save sbrajesh/5086969 to your computer and use it in GitHub Desktop.
<?php
add_filter("bppg_iwilldo_it_myself","__return_true");//stop the plugin to inject css
//now we can write our own css
add_action("wp_head","my_css_for_profile_bg");
function my_css_for_profile_bg(){
$image_url=bppg_get_image();
if(!$image_url)
return;//this user has not uploaded an image yet
?>
<style type="text/css">
body.is-user-profile div#container #content .padder{
background:url(<?php echo $image_url;?>) no-repeat;/*please customize it*/
background-size:100%;
}
</style>
<?php
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment