[resolved] add custom background function for multisite theme (24 posts)

  1. dguyen
    Posted 5 years ago #

    Scouring the internet with no avail. When implementing the add_custom_background to my functions.php file -the image uploader does not work. Color picker works but not the image upload.

    I am testing on two local installs. First on a custom theme with multisite enabled and one on default install using TwentyTen. The background image does not store... what is up?

    Thanks in advance to this wonderful community!

  2. So... on a default install with the default theme it won't let you upload a custom background?

    What error do you get?

  3. dguyen
    Posted 5 years ago #

    That's the thing, I don't get any errors... it says it's saved, but doesn't show in the preview or on show up on the actual site. I also don't see the file in uploads, either! I assume the background image saves to that directory, no?

    I must have something wrong! I just can't figure it out.

  4. What's the permissions on the uploads folder?

    Because it definitely works in multisite.

  5. What uploads folder? You're looking in blogs.dir/#/files

  6. dguyen
    Posted 5 years ago #

    Here's the quirky issue. As I was scanning wp-admin/custom-background.php I noticed there are suppose to be headings for:

    • Positions
    • Repeat
    • Attachment

    But I don't see those additional options in my admin area under Background? What does anyone else think? As for the blogs.dir files and uploads folder, I have no problem uploading images (via Media uploader)...

    Any suggestions to my add_custom_background saving image upload problem?

  7. I think we need more info. the default install works fine in multisite, the custom background works fine in multisite. It has to - they use it on wordpress.com.

    It;s just not working on *your* site. and none of us can check it because we have no idea where that is. :)

  8. dguyen
    Posted 5 years ago #

    I understand. I know for sure it's a problem with my own install. I found that to be once both installations (multisite and default) exhibited the same issue.

    I want to verify... under "Background" are there options for Position, Repeat, and Attachment?

  9. those options show up *after* you upload the file. they pop right down on ya.

    I just went and did it myself. Did you try uploading a graphic?

  10. dguyen
    Posted 5 years ago #

    I tried to upload two different pictures and a graphic (PNG). One picture that was the same as one uploaded using the Media Uploader and a completely separate JPG. Both pictures work fine when using the custom Header option. It's just the damn custom Background option.

    I've re-installed WP (automatically), I think I might just have to uninstall fresh reinstall...

    Andrea_r thanks for your persistence. Don't worry about giving this much more attention. It's gotta be something I've messed with. If you come up with anything "A HA" like, then please post, otherwise... I'll keep plugging away and re-post when I find the solution.

  11. CircleReader
    Posted 5 years ago #

    Having this same problem on my site. Says file is uploaded, gives the position/repeat/attachment options -- but no preview or change to background. Color picker works fine.

    About to try the dreaded plugin flush...

    ...with no effect. For once, it does not seem to be a plugin.

    I'm on 3.1 - alpha using my custom (i.e. hacked-up) Genesis Child theme.

  12. So... you added this feature to your own child theme (or a child theme that didn't have it)?

  13. CircleReader
    Posted 5 years ago #

    Hmm... I'm getting similar "seems to work but doesn't display the image" behavior with ordinary uploading of images to a post.

    Caption / CSS box shows, but there's no image.

    (Yes, this is a Network install.)

    The image (a woodcut of a whirlpool) has been uploaded to the appropriate folder, but isn't displayed. In fact, when I check this month's folder, I find multiple copies of the background images that I attempted to use earlier. (I added custom background support to the functions.php file of my Genesis child theme.)

    Is this happening for you as well, dguyen?

  14. That's a different issue then. :)

  15. CircleReader
    Posted 5 years ago #

    Guess so. :-(

    Know anyone / anythread else with uploader problems?

  16. CircleReader
    Posted 5 years ago #

  17. CircleReader
    Posted 5 years ago #

    Fixing the .htaccess rewrite rules as in http://wordpress.org/support/topic/images-are-not-uploading-into-correct-file-1?replies=20#post-1712849 above fixed the custom background, though not the other image issues - yet.

    Fixing the rest of the .htaccess like this: http://wordpress.org/support/topic/images-are-not-uploading-into-correct-file-1?replies=20#post-1713882 fixed the other image issues as well.

    Thanks to the pirate & half-elf! ;-)

  18. dguyen
    Posted 5 years ago #


    I did not find the cause of my issue. I did an uninstall and re-install and my issues were resolved. I'm fairly sure my problems lay with my own doing. Most likely somewhere in the .htaccess arena...

    Good luck, please post something if you discover anything.

  19. CircleReader
    Posted 5 years ago #

    Sounds like your .htaccess got fixed in the re-install. (??) Glad you are up an running again!

  20. qnub
    Posted 5 years ago #

    on nginx same problem. can't upload background image for theme on any installation (new WP, twentyten or my theme)

  21. What error do you get? We're running nginx in a couple places, works for us.

  22. qnub
    Posted 5 years ago #

    absolutely nothing. just upload picture and... nothing. all logs clear :(

  23. qnub
    Posted 5 years ago #

    sorry - system write me that's all good and check site, but back is empty. "upload" directory empty too.

  24. qnub
    Posted 5 years ago #

    OMG! i'm are idiot! :) i select file and press 'save changes' instead of 'upload'! all current day i search error in code and server sonfiguration and that is it...

    maybe need to write some note next to file selection field about that... :)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.