Support » Fixing WordPress » Editing a submenu link

  • Nikolas


    I am trying to make edit.php to show only the author’s posts instead of showing all the posts of the blog. ( I have several authors into my blog )
    If you click on the username of the author, in the edit.php you have this link: edit.php?author=1 (for author number 1)

    I think I found the variable that makes it :
    <?php the_author_meta(‘ID’); ?>

    under the :
    “><?php the_author() ?>

    but i got this error :
    Parse error: syntax error, unexpected T_STRING, expecting ‘)’

    when i tried to add it on wp-admin/menu.php here :
    $submenu[‘edit.php’][5] = array( __(‘Edit’), ‘edit_posts’, ‘edit.php’ );

    Anyone can help me by adding correctly the
    edit.php?author=<?php the_author_meta(‘ID’); ?>
    into the submenu ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Nikolas


    Because the system didnt let me to post correctly the url here it is again :

    a href = ” edit . php ? author = <?php the_author_meta(‘ID’) ; ?



    anyone ?

    Hi, I’m really new at WordPress, but let me take a shot. You might consider adding a submenu to the “Post” menu on the administration page. You could write a plugin as to not mess with the core code:

    // Hook for adding admin menus
    add_action(‘admin_menu’, ‘mt_add_pages’);

    // action function for above hook
    function mt_add_pages() {

    add_submenu_page(‘edit.php’, ‘page_title’, ‘Show my posts’, ‘author’, ‘edit.php?author=1’, ”);


    I hope this helps.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Editing a submenu link’ is closed to new replies.