WordPress.org

Ready to get started?Download WordPress

Forums

Related Links
Displaying meta box on unwanted post types (1 post)

  1. akbortoli
    Member
    Posted 1 year ago #

    Hello @chabis, great plugin, it works exactly as I wanted!

    The only problem I'm having is with the meta box been shown on unwanted post types, even thou I have unticked the box on the settings page.

    the problem is that it's not been checked if the current post type is on the list:

    Version 1.7.1
    WP 3.5.1

    class-related-links-box.php lines 95 - 100 (original)

    public function add_box()
    {
        global $post_type;
    
        add_meta_box( 'related-links-box', __( 'Related Links', 'related-links' ), array( $this, 'create_box_content' ), $post_type, 'side', 'low');
    }

    My implemented fix:

    class-related-links-box.php lines 95 - 103 (modified)

    public function add_box()
    {
        global $post_type;
    
        if (!in_array($post_type, $this->settings['types']))
            return;
    
        add_meta_box( 'related-links-box', __( 'Related Links', 'related-links' ), array( $this, 'create_box_content' ), $post_type, 'side', 'low');
    }

    Please ignore if this has been fixed or if it's been checked somewhere else.

    http://wordpress.org/extend/plugins/related-links/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags