Support » Plugins and Hacks » [Resolved] [Plugin: Background Per Page] Custom background appears even when the post is part of a list

[Resolved] [Plugin: Background Per Page] Custom background appears even when the post is part of a list

Viewing 10 replies - 1 through 10 (of 10 total)
  • i fixed it,
    you also had a bug:
    in add_background_per_page()
    you were only putting a background if there was an image so i changed the
    if($src!=””) to
    if($src != ” || $color != ‘Transparent’)

    also i added some functionality to assign a background to the category pages and to every post belonging in that category which does not have a specific background assigned.

    Its not beautiful code and it lacks a couple functionality/usability tweaks but if you want to include it to the next version i can work on it a bit more, just drop a line 🙂
    you can view the results in the page i mentioned above

    Plugin Author Fish Can’t Whistle



    Sounds like some great work! Do you want to send me the code and I’ll stick it in?


    Here is it



    Its a quick and dirty solution pieced together on-the-fly but it works.

    If you want to make it better feel free 🙂
    otherwise i’ll probably get back to it around mid-November or so.



    Hi guys, we are having the same problem.

    We have assigned a background image to each page and that is working fine. But for each taxonomy (blog category) we have hard coded the background image for each category into the theme. The problem now is that we are getting (for a fraction of a second) the last image assigned using your widget before the hardcoded background appears.

    When checking with firebug, your background is being called first before our customised one loads. We have tried to change this so that the default background is called first but to no avail.

    It is a similar problem to what NorthDPole has and we wondered if you had incorporated his idea into an update? Otherwise, is it possible to insert a reset code into the widget so that it does not call the last assigned background image but assigns the default one instead?

    Many thanks



    hi cheltenhammedia I would propose to patch the plugin with the code I provide above, and substitude the hardcoded values with the more easily customizable plugin options.

    A more immediate solution to your problem would be to substitute only this file

    and in function add_background_per_page() line 171
    Modify the if statement to make $data = array(‘src’=>””,’color’=>’Transparent’);

    and after the if block (line:207) insert an else statement which echoes your hardcoded values

    another solution which I’m not sure if it works would be to put an Importand css marker for your backgrounds and maybe place your background before the plugin’s one



    Thanks for your response on this NorthDPole.

    I tried working with your code but just coould not get it to work. I removed the include statement (line 13) for admin-page.php but the background would just not work at all. I could not find the $data = array(….); statement in the function you mentioned.

    Any chance of emailing me anthony [at] cheltenhammedia [dot] com and I could go through this with you if possible?



    Hi NorthDPole,

    thanks for the code, it seems to be on the right track.

    However it seems to work just for one category. As soon as I add an image to another category, the first one dissapears.

    Any suggestions?

    Also, it would be great if a sub-categories of a category would retain the parent’s image (as in the original plugin)


    hi horria, in principle they should if they dont have a background of their own

    the inheritance goes as follows: If category has image append the css for the category
    if post has image append for post

    it works as demonstrated here:
    category 1

    category 2

    single post

    check this piece of code (i did some bugfixing and added a couple of features)

    note: the example links will be broken after sunday night

    Hi NorthDPole,

    First of all i would like to thank you for contributing your effort to make a bit change in Background per page, also I would like to thank fish can’t whistle for developing this plugin, I wonder this plugin will surely do good in coming days if you both guys join together to re-structure this plugin to suit post, catagory and page needs.

    Currently, if we only use this plugin without northdpole code we get can easily implement different background in every single page and post but the drawback is that we cannot assign different background for homepage and it is because the background is taken from latest post page.

    Now if we use northdpole code the drawback i found is that we cannot change page background individually but the code works fine for post and the homepage background.

    I would like to ask a quick question, Can anybody here tell me how to get my page background also work?


Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] [Plugin: Background Per Page] Custom background appears even when the post is part of a list’ is closed to new replies.