WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] add_custom_background() deprecated after 3.xx (7 posts)

  1. belui
    Member
    Posted 2 years ago #

    Ahoj!

    add_custom_background() deprecated after Version 3.4 messed my Theme up.
    I did change functions.php to
    add_theme_support('custom-background');
    but then I only get a message that I can toggle between drafts.
    My site disappeared..
    What's wrong?

    Please help, otherwise I only can downgrade to 2.9 !
    thank you!

  2. belui
    Member
    Posted 2 years ago #

    I got it!

  3. bperry921
    Member
    Posted 2 years ago #

    What did you do to fix it, I'm having trouble my 3.4.1 install?

  4. belui
    Member
    Posted 2 years ago #

    I changed the deprecated function

    // Allows users to set a custom background
    add_custom_background();

    in functions.php

    But instead of:
    add_theme_support( 'custom-background', $args );
    as it was advised, I changed it to

    add_theme_support('custom-background');

    without the variable args.

  5. belui
    Member
    Posted 2 years ago #

    that helped me

  6. bperry921
    Member
    Posted 2 years ago #

    I'm relatively new to WordPress source file editing, I don't know which line to edit because I use search/find on various text of what I read about above and can't seem to locate where and what to edit, not even sure that function.php is the correct file to edit... please advise

  7. wp_sam
    Member
    Posted 2 years ago #

    Same Problem here @bperry 921 you can use Filezilla FTP and then you need to look for a file in theme folder go to wp-content -> themes -> your active theme -> function.php (it may be somewhere else but will be in theme folder only) you need to search for add_custom_background(); and replace it with add_theme_support('custom-background');. Most important is to keep backup of function.php file so if anything goes wrong you have the back file.

Topic Closed

This topic has been closed to new replies.

About this Topic