Custom background to groups

Support Area Forums Foxy Custom background to groups

Viewing 14 posts - 1 through 14 (of 14 total)
URL to the page in question:
  • Author
    Posts
  • #6976
    cheltenhammedia
    Participant

    Hi bill,

    We are currently trying to add a custom background to three groups under staff. We have added backgrounds to the main site, and vaious posts and pages with Background Per Page no problem and it works well.

    But, we are having a real issue with trying to assign backgrounds to taxonomy=staff-group&post_type=staff. Is there a css way of doing this and if so where?

    Any help much appreciated.

    Anthony

    #6978
    Bill Robbins
    Participant

    Anthony,

    Thank you for your business first of all. You can do that. I just posted directions for a restaurant that was doing the same thing to their menu day before yesterday. You can find that thread on this post.

    Using the instructions on that post as the starting point, you’d only need to make a couple of changes. The spot that would be different in the code is this:

    
    is_tax( 'menu-group', 'dogs' )
    

    Change that to this:

    
    is_tax( 'staff-group', 'group1' )
    

    Then change the group1 to the slug of your staff group (there’s a description on how to find that in the other post). Repeat that for your other staff groups and that will add a unique background image for each group.

    If you run into any questions or trouble, let me know,
    Bill

    #6984
    cheltenhammedia
    Participant

    Awesome Bill,

    It worked a dream, many thanks.

    #6985
    Bill Robbins
    Participant

    Fantastic! Let me know if you need anything else.

    #7584
    cheltenhammedia
    Participant

    Morning Bill,

    Could you advise as to why when selecting various taxonomies (such as staff or menu) before the assigned background loads we are getting another pages background for a brief second, it is like a bleed over that then goes.

    It really has us stumped, is this a result of the previous coding changes we made in August (above)?

    Many thanks

    Anthony

    #7586
    Bill Robbins
    Participant

    Anthony,

    Any chance you could send over a link so I can take a closer look? The backgrounds are output via PHP so they are decided before the page is created. We’ll figure it out though.

    Thanks,
    Bill

    #7588
    cheltenhammedia
    Participant

    Hi Bill,

    Here is the website:

    http://www.wearefab.co.uk

    login: guest
    password: guest

    When flipping between the various section you will see what I mean. Thanks for having a look at this one.

    Anthony

    #7590
    Bill Robbins
    Participant

    Anthony,

    Thanks for sending the link (great looking site by the way).

    I did see the background appear and disappear briefly until my browser cached all the background files. I took a look at your code and I think this is what’s causing the flash:

    
    <style type="text/css" id="custom-background-css">
    body.custom-background { background-image: url('https://www.wearefab.co.uk/wp-content/uploads/2012/09/welcome4.jpg'); background-repeat: no-repeat; background-position: top center; background-attachment: fixed; }
    </style>
    

    That’s setting an image as the site “background” which is visible shortly before the page background load. I believe if you take that out that will help.

    If you have any questions or trouble, let me know,
    Bill

    #7592
    cheltenhammedia
    Participant

    Awesome Bill,

    The ‘page per background’ plugin has a default background that you set for those pages that do not have a custom background and it was this that was causing the problem. We have removed it and it has sorted out the problem.

    Many thanks for your help. It need a fresh pair of eyes.

    Cheers

    Anthony

    #7594
    Bill Robbins
    Participant

    No problem at all. Sometimes all that’s needed is an extra set of eyes.

    #7667
    cheltenhammedia
    Participant

    Morning Bill,

    Everything is now working fine on the site what with all the customisation done but we are still unable to assign a background to the NEWS* (blog) page. Do we need to add some coding to the custom-js.php like we did before (see above).

    We have checked with Firebug and the background we assigned on the page (Background Per Page Plugin) is just not registering.

    Any advice Bill?

    Anthony

    #7670
    Bill Robbins
    Participant

    You know you’re right; I don’t have an option there for the blog page background. You can add in an image file directly into the custom-js.php file though. Look for this spot:

    
    <?php elseif (is_page() && has_post_thumbnail() ): ?>
    											
    											<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
    											{image : '<?php echo $image[0]; ?>'}
    

    and right below that paste this:

    Then just replace the http://yoururl.com/image.jpg with the URL to the image you'd like to use. That will cause your image to be displayed on your main blog page and also archive pages too.

    If you have any trouble, let me know,
    Bill

    #7671
    cheltenhammedia
    Participant

    Thanks for this Bill, I add ed the coding but no joy. Still no background on the blog. Here is what we now have in the custom-js.php


    ID ), ‘single-post-thumbnail’ ); ?>
    {image : ‘‘}


    {image : ‘http://www.wearefab.co.uk/wp-content/uploads/2012/09/news-background2.jpg&#8217;}

    {image : ‘http://www.wearefab.co.uk/wp-content/uploads/2012/09/news-background2.jpg&#8217;}

    Checked the source and in Firebug but it is just not showing up anywhere.

    Any ideas?

    Anthony

    #7672
    cheltenhammedia
    Participant

    Scrub that Bill, we have fixed it, there was a conflict in the gallery. The coding works great now. Many thanks again

    Anthony

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Custom background to groups’ is closed to new replies.