Deactivation of linking to posts or taxonomies

Support MB Admin Columns Deactivation of linking to posts or taxonomies

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #40179
    dotsuniteddotsunited
    Participant

    Hi,
    we are using the MB Admin Columns Plugin and would like to unlink the posts or taxonomies in the admin column. Is it possible to remove it per column or for all columns?

    #40191
    PeterPeter
    Moderator

    Hello,

    The admin column uses the helper function rwmb_the_value to show the field value. You can use this filter hook to change the field value when showing on the backend. For example:

    add_filter( 'rwmb_the_value', function( $output, $field, $args, $object_id ) {
        $post_field = rwmb_meta( 'post_xyfc97ama79', $args, $object_id );
    
        if( is_admin() && $field['id'] == 'post_xyfc97ama79') {
            if( $post_field ) {
                $output = get_the_title( $post_field );
            }
        }
        
        return $output;
    }, 11, 4 );

    change the field ID post_xyfc97ama79 with your field ID. Please get more details on the documentation https://developer.wordpress.org/reference/functions/get_the_title/
    https://docs.metabox.io/functions/rwmb-the-value/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.