WordPress.org

Ready to get started?Download WordPress

Forums

Background Manager
Custom image set for custom post type archive (5 posts)

  1. Tibor Paulsch
    Member
    Posted 11 months ago #

    Thanks for this very helpful plugin!

    Would it be possible to set a custom background image for a specific custom post type archive?

    Thanks in advance

    http://wordpress.org/plugins/background-manager/

  2. Tibor Paulsch
    Member
    Posted 10 months ago #

    To be more precise: how can change the default background that's being used on archive-ctp-name.php

  3. Tibor Paulsch
    Member
    Posted 10 months ago #

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

  4. Tibor Paulsch
    Member
    Posted 10 months ago #

    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?

  5. Tibor Paulsch
    Member
    Posted 10 months ago #

    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 :-)

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.