• How can I remove the main links in the “title” column in the post table? “title” link is a double of small link “modify”, I’d like to keep visible by default only the “small” links, without the need to pass the cursor over them to see them

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • You can influence the links under the title via this hook:

    https://developer.www.ads-software.com/reference/hooks/post_row_actions/

    Simple example:

    add_action( 'post_row_actions', function( $actions, $post ) {
        if( $post->post_type === 'post' ) {
            unset($actions['edit']);
        }
        return $actions;
    }, 10, 2 );

    You would have to insert this in the functions.php of your child theme or via code snippet plugin.

    Thread Starter sacconi

    (@sacconi)

    Ok, this works if I want to remove a “little” link, i.e. “edit” link. I tryed to see what was the span class name for the “big” link above, but I couldnt find it, I found just just a simple link class such as “row-title”, so I tryed with it, but the main “big” link doesnt disappear

    The title is not one of the actions, so you cannot remove it. I wouldn’t think you can remove the title at all.

    Moderator bcworkz

    (@bcworkz)

    It is possible to entirely remove the column and replace it with your own custom column that displays what ever you want.

    You can hide the bold titles with CSS, but then you will not be able to know which post goes with each column. You cannot remove the link and keep the title unless you entirely replace the column.

    You could remove the hover effect so all the action links are always visible.

    .row-actions {
        left: 0;
    }

    Admin styles are independent of theme styles. Admin stylesheets should be enqueued from the “admin_enqueue_scripts” action hook. For brief style rules, they could be echoed out from the “admin_print_styles” action hook.

    FWIW, I think the action links always being visible makes the whole screen look messy. IMO it’s good they only appear on hover.

    Thread Starter sacconi

    (@sacconi)

    this CSS is not working (I put it in the personalizer)

    Moderator bcworkz

    (@bcworkz)

    personalizer == customizer? Additional CSS in the customizer is only for front end styling. You need to use PHP to add admin styles.

    add_action('admin_print_styles', function(){
    echo '<style>.row-actions {
        left: 0 !important;
    }
    </style>';
    }, 9999 );
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Change post table links’ is closed to new replies.