WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Background image not displaying even with add_custom_background(); (8 posts)

  1. Graycode
    Member
    Posted 1 year ago #

    Hi all,

    I have been searching online for a bit and i have read other posts, but I cannot find anything specific to my issue.

    I go to Appearance > Background and upload an image which doesn't show at the background of my WordPress theme. I installed the Simple Full Screen Background Image Plugin and it doesn't show. I did build on this theme from the existing New 3.0 Theme.

    A background image only seems to work by hard coding it from css and i am trying to make it as easy as can be (as it should be!) that doesnt involve hard code. There doesnt seem to be any real reason why this doesnt work.

    I've put this in my functions.php to call the background and using
    if(function_exists('add_custom_background')) add_custom_background();

    Could anyone help me out on this? Its seriously bugging me!

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Which theme are you using?

  3. Graycode
    Member
    Posted 1 year ago #

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    It sounds like a path issue, whereby your image path is incorrect.
    What path are you using for your image?

  5. Graycode
    Member
    Posted 1 year ago #

    It's not a path issue. I have uploaded this file into my media library and am calling it from Appearance > Background but to no avail.

    I have hard coded it using CSS as that was what i was doin initially, but if i try using the editor, it doesnt work....

  6. Graycode
    Member
    Posted 1 year ago #

    I'm trying to avoid coding it for the use of the person who will eventually look after this site. They arent code savvy and i thought with 3.0 it was a great addition... but i am missing something, right?!

  7. Andrew
    Forum Moderator
    Posted 1 year ago #

    I see.
    I don't know the answer to this, but I'm sure other forum volunteers will help you.

  8. Graycode
    Member
    Posted 1 year ago #

    Looked again and saw this crucial line missing from my header.php file :

    <body <?php body_class(); ?>>

    Now it works! :)

Topic Closed

This topic has been closed to new replies.

About this Topic