WordPress.org

Ready to get started?Download WordPress

Forums

WP Simple Galleries
[resolved] Add to custom post type? (4 posts)

  1. AleK.Empire
    Member
    Posted 2 years ago #

    How to add this functionality to custom post types?

    in the file wp-simple-gallery.php from line 70 tp 77 it seems there's the function to add the meta box to posts and pages

    public function add_meta_boxes() {
            add_meta_box(
                    'wpsimplegallery', __('WP Simple Gallery', 'wpsimplegallery'), array(&$this, 'inner_custom_box'), 'post'
            );
            add_meta_box(
                    'wpsimplegallery', __('WP Simple Gallery', 'wpsimplegallery'), array(&$this, 'inner_custom_box'), 'page'
            );
        }

    but if i change to:

    add_meta_box(
                    'wpsimplegallery', __('WP Simple Gallery', 'wpsimplegallery'), array(&$this, 'inner_custom_box'), 'MY-CUSTOM-POST-TYPE-NAME'

    No meta box appears in my custom post type.
    Any sugestion?
    Thanks in advance

    http://wordpress.org/extend/plugins/wp-simple-galleries/

  2. Matthew McConnell
    Member
    Plugin Author

    Posted 2 years ago #

    Hey

    I have added an option to the plugin. You can set which post types galleries show up in.

    Matt

  3. AleK.Empire
    Member
    Posted 2 years ago #

    Hey Matt, thanks so much!

  4. Matthew McConnell
    Member
    Plugin Author

    Posted 2 years ago #

    Cool!

    Rate the plugin if you like =)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic