WordPress.org

Ready to get started?Download WordPress

Forums

"add_custom_background" only for the home page (2 posts)

  1. synthview
    Member
    Posted 3 years ago #

    I'd like to add the custom background to the home page only.
    To do this I'd like to customize the _custom_background_cb() function, in includes/theme.php line 1535.
    In fact for me would be enough to change the last lines

    <style type="text/css">
    body { <?php echo trim( $style ); ?> }
    </style>
    <?php
    }

    and to echo something like

    <style type="text/css">
    body <strong>#HP</strong> { <?php echo trim( $style ); ?> }
    </style>
    <?php
    }

    Somebody could help me in that please ?

  2. crerem
    Member
    Posted 3 years ago #

    Read this article : using custom background function to style any other div

    You need copy paste a function from theme.php, do minor changes and call that function via add_custom_background() in functions.php

Topic Closed

This topic has been closed to new replies.

About this Topic