Support » How-To and Troubleshooting » Links At Top Of Edit Page

Links At Top Of Edit Page

  • Made the edits shown below to wp-admin/edit.php so as to only show “My Posts” and remove other links on the ‘edit posts’ page. for users less than access level 4 .

    Only editors & administrators can access the other links.
    Subscribers & Contributors only see “My Posts” option

    Is there any other way / plugin where I would not have to edit core wordpress files?

    /*My Edit Start*/
    global $current_user;
    if ($current_user->user_level > 4) {
    /*My Edit End*/
    	$status_links[] = "<li><a href='edit.php{$allposts}'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . '</a>';
    	foreach ( $post_stati as $status => $label ) {
    		$class = '';
    		if ( !in_array( $status, $avail_post_stati ) )
    		if ( empty( $num_posts->$status ) )
    		if ( isset($_GET['post_status']) && $status == $_GET['post_status'] )
    			$class = ' class="current"';
    		$status_links[] = "<li><a href='edit.php?post_status=$status'$class>" . sprintf( _n( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status ) ) . '</a>';
    /*My Edit Start*/
    /*My Edit End*/
Viewing 1 replies (of 1 total)
  • I have essentially enclosed the code into an if statement.
    Line 204 file /wp-admin/edit.php

    Do not want to keep this edit to the core file as I would have to keep fixing after every wordpress upgrade. Hoping there’s a plugin or another way.

    I am already using the Hide Dashboard plugin http://wordpress.org/extend/plugins/wp-hide-dashboard/. That’s a great plugin, but unfortunately doesn’t hide the said links

Viewing 1 replies (of 1 total)
  • The topic ‘Links At Top Of Edit Page’ is closed to new replies.