WordPress.org

Ready to get started?Download WordPress

Forums

Preference Lite
[resolved] [closed] Preference-lite top half background (6 posts)

  1. weazer4002
    Member
    Posted 1 year ago #

    I like how this theme allows you to put an image as the background, but it is only or the bottom half. So my question is how do I change the code on the top half of the background to allow me to put an image in there instead of just the color option?

  2. StyledThemes
    Member
    Theme Author

    Posted 1 year ago #

    In the theme's style.css is this css:

    /* Primary wrappers */
    #page-top-bg {
    	width:100%;
    	height:353px;
    	position:fixed;
    	background-color:#fff;
    	border-top:6px solid #595a67;
    	border-bottom:1px solid #bcbcbc;
    }

    `
    You can do your background there....but you will also need to adjust the header.php file which has this bit of code:

    <div id="page-top-bg" style="border-top-color: <?php echo get_theme_mod( 'page_top_border', '#595A67' ); ?>; border-bottom-color: <?php echo get_theme_mod( 'tophalf_botline', '#BCBCBC' ); ?>; background-color:<?php echo get_theme_mod( 'tophalf_bg', '#ffffff' ); ?>;"></div>

    Remove this code part:

    style="border-top-color: <?php echo get_theme_mod( 'page_top_border', '#595A67' ); ?>; border-bottom-color: <?php echo get_theme_mod( 'tophalf_botline', '#BCBCBC' ); ?>; background-color:<?php echo get_theme_mod( 'tophalf_bg', '#ffffff' ); ?>;">

  3. weazer4002
    Member
    Posted 1 year ago #

    Thank you!

  4. StyledThemes
    Member
    Theme Author

    Posted 1 year ago #

    You're very welcome... however, you may want to consider using a child theme to make modifications to core theme files. This way you won't lose your changes should there be updates to this theme.

  5. sitecrafter
    Member
    Posted 5 months ago #

    Hello

    I am adding on to this post as it is relevant to my query...

    I would like to keep the top half different to the bottom - however I would like to add an image to the top half... I tried the above and took out the php code (in the child theme) but this leaves me with no top half and I don't know how to add the image just for the top?? (I am sorry if this doesn't make sense, I am also sorry if I have posted in the wrong place!)

    ps. beautiful theme, thank you!

  6. StyledThemes
    Member
    Theme Author

    Posted 5 months ago #

    @Sitecrafter...thanks for the great comment. However, I would recommend you post this as a new support topic because this topic has already been set to "Resolved" and I know the moderators will catch this as well. Post it as a new one and I will be happy to follow up.

    http://wordpress.org/support/theme/preference-lite#postform

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic