Re-order Tabs in Front End

This topic contains 7 reply and 6 voices, and was last updated by Baz 9 years, 5 months ago
Viewing 7 Posts - 1 through 7 (of 7 total)
Author Posts
May 6, 2013 at 11:37 pm 3248
Baz Hi, How would I go about re-ordering the tabs in the front-end so the to-do list appears before activity? Thanks, Claire
May 7, 2013 at 2:08 pm 3297
Tareq Hasan Tareq Hasan

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]

December 9, 2013 at 9:54 pm 13552
Heather Heather

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

December 24, 2013 at 11:45 pm 13936
James James

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.

October 30, 2014 at 12:03 pm 29422
Baz Baz

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.”

October 31, 2014 at 12:04 am 29485
Kristin Kristin

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 );
October 31, 2014 at 10:04 am 29498
Baz Baz

thanks heaps

November 13, 2014 at 10:28 am 30355
Baz Baz

is it possible to do this on the front end?

Viewing 7 Posts - 1 through 7 (of 7 total)