Support » Plugin: Background Manager » Custom image set for custom post type archive

Viewing 4 replies - 1 through 4 (of 4 total)
  • To be more precise: how can change the default background that’s being used on archive-ctp-name.php

    Never mind: found how to do this; choose specific image set in bg-settings page and edit defaults there 🙂

    Hmm..that was too early…that doesn’t work either. Would there be a hook or filter to add a specific gallery ID to a custom post type archive, instead of the deafault?

    For now I solved this with jquery:

    jQuery(document).ready(function($){
         if(jQuery("body").hasClass("post-type-archive-event")) {
         	jQuery('#myatu_bgm_top').css('background-image', 'url(http://yourdomain.etc/wp-content/uploads/2013/08/event.jpg)');
         }
         if(jQuery("body").hasClass("post-type-archive-customer")) {
         	jQuery('#myatu_bgm_top').css('background-image', 'url(http://yourdomain.etc/wp-content/uploads/2013/08/customer.jpg)');
         }
    });

    Since I’m only using one background image per image set this works, but it’s sub-optimal ofcourse 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom image set for custom post type archive’ is closed to new replies.