Background Manager
[resolved] Enable in Custom Post Types (3 posts)

  1. facebuko
    Posted 4 years ago #

    How would you activate the Background Manager (which also includes the Overriding Feature) for Custom Post Types?


  2. myatu
    Plugin Author

    Posted 4 years ago #

    The ability to override the background currently exists in only the "Post" and "Page" post types (in the form of an additional "Meta" box called "Background" visible on each Post or Page edit screen).

    This can be changed manually, by editing the file (...)/wp-content/plugins/background-manager/app/Myatu/WordPress/BackgroundManager/Meta/Single.php on line 28:

    protected $pages = array('post', 'page');

    Simply use the registered name of the Custom Post Type.

    If you wish to have the ability to do this from within your own plugin, or via the Background Manager settings screen, let me know. It would be possible to add a filter for this purpose.

    Edit: The same goes for activation/deactivation on specific post types, however, this would require slightly more manual editing at the moment. Namely (...)/wp-content/plugins/background-manager/resources/views/settings.html.twig and various sections of code within (...)/wp-content/plugins/background-manager/app/Myatu/WordPress/BackgroundManager/Main.php

  3. myatu
    Plugin Author

    Posted 4 years ago #

    Just an update on this. I've just released version 0.9.1, which will automatically add any Custom Post Type to the Active On list, provided it is set as Public.

    This also goes for the ability to override it, but will depend if WordPress internal editor - or compatible - is used for the Custom Post Type.

    There is no filter, as I had suggested would be a possible.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic