Home Forums Plugin Support WP Project Manager Pro Re-order Tabs in Front End

This topic is: not resolved

Tagged: , ,

This topic contains 7 replies, has 6 voices, and was last updated by  Baz 4 years, 4 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #3248

    Elitivia
    Participant
    Post count: 4

    Hi,

    How would I go about re-ordering the tabs in the front-end so the to-do list appears before activity?

    Thanks,

    Claire

    #3297

    Tareq Hasan
    Keymaster
    Post count: 2831

    Insert this snippet in your themes functions.php, it should work. Make sure you are using the latest version of WP Project Manager plugin.
    [php]
    add_filter( ‘cpm_project_nav_links', ‘pm_frontend_nav_links', 10, 2 );

    function pm_frontend_nav_links( $links, $project_id ) {
    $links = array(
    __( ‘To-do List', ‘cpm' ) => cpm_url_tasklist_index( $project_id ),
    __( ‘Activity', ‘cpm' ) => cpm_url_project_details( $project_id ),
    __( ‘Messages', ‘cpm' ) => cpm_url_message_index( $project_id ),
    __( ‘Milestones', ‘cpm' ) => cpm_url_milestone_index( $project_id ),
    __( ‘Files', ‘cpm' ) => cpm_url_file_index( $project_id )
    );

    return $links;
    }
    [/php]

    #13552

    Heather
    Member
    Post count: 11

    I did this and worked fine. Is it possible to hide the “activity” tab when users are on the front end?

    #13936

    James
    Member
    Post count: 1

    I was able to re-order the tabs successfully, but would like the default to be Milestones, not Activity. How can I change that? Thanks.

    #29422

    Baz
    Member
    Post count: 4

    Was there a way to do this? “I was able to re-order the tabs successfully, but would like the default to be Milestones, not Activity. How can I change that? Thanks.”

    #29485

    Kristin
    Member
    Post count: 27

    To open a different page other than “Activity” when clicking the projects link in Admin go to line 80 in includes/urls.php.

    I modified mine to open Todo Lists as the default as opposed to Activities.

    Specifically you will want to change:

    
    $url = sprintf( '%s?page=cpm_projects&tab=project&action=single&pid=%d', admin_url( 'admin.php' ), $project_id );
    

    to

    
        $url = sprintf( '%s?page=cpm_projects&tab=milestone&action=index&pid=%d', admin_url( 'admin.php' ), $project_id );
    
    #29498

    Baz
    Member
    Post count: 4

    thanks heaps

    #30355

    Baz
    Member
    Post count: 4

    is it possible to do this on the front end?

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Re-order Tabs in Front End’ is closed to new replies.