Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #23784

    How do I get rid of my background image from my other pages?  I am using the Callaway theme.  The background image of the Home page is present on all my other pages and clashes with the way the site will look after the content and galleries are put up.  (If I ever get there…)  I’ve even tried adding a blank page but it still has the background image.  Thank you in advance!

    Debbie

    #23785

    Hello Debbie,

    Thank you for your question about using a different background image on pages. At the moment, the only way to change this behavior is outside of BoldGrid itself.

    Using the WordPress is_page function, a PHP conditional statement can display different page information. However, that kind of modification would fall under the category of general WordPress development, for which you would be best advised to check out the WordPress Codex or contact a WordPress developer.

    It is of critical importance to only apply this change in a child theme.

    The code in this case would look something like this:

    <?php
    if ( is_page( ‘about’ ) || ‘2’ == $post->post_parent ) {
    // the page is “About”, or the parent of the page is “About”
    $bannerimg = ‘about.jpg’;
    } elseif ( is_page( ‘learning’ ) || ’56’ == $post->post_parent ) {
    $bannerimg = ‘teaching.jpg’;
    } elseif ( is_page( ‘admissions’ ) || ’15’ == $post->post_parent ) {
    $bannerimg = ‘admissions.jpg’;
    } else {
    $bannerimg = ‘home.jpg’; // just in case we are at an unclassified page, perhaps the home page
    }
    ?>

    Best,

    Christopher M.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Different Background for Pages’ is closed to new replies.