• 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.

    https://www.ads-software.com/extend/plugins/related-links/

  • The topic ‘Displaying meta box on unwanted post types’ is closed to new replies.