Home Forums Plugin Support WP Project Manager Pro Project order

This topic is: resolved

This topic contains 7 replies, has 3 voices, and was last updated by  Kerstin 3 years, 9 months ago.

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

    Kerstin
    Member
    Post count: 6

    Is there a way to change the project order in the overview? The projects created are ordered by creation date as it seems. For my purposes it would be clearer to order the Projects by project names / titles

    Thank's!

    #66277

    Yeasin Arafat
    Moderator
    Post count: 96

    Hello Kerstin,

    We do not have this feature right now. If you want this feature then you have to customize.

    Thank you.

    #66284

    Kerstin
    Member
    Post count: 6

    Hello,

    could you please tell me how or in which script? I thought this is a basic functionality… Will this feature be implemented in the next update? I have even more ideas ๐Ÿ˜‰

    Thank's!

    #66308

    Nayem
    Moderator
    Post count: 6480

    Hello,

    If you want to show your proejct in order of name or character then please open Project manger/class/project.php file.

    In this file you will get those code in line number 528-

    $args = array(
                'post_type'   => 'task_list',
                'numberposts' => -1,
                'order'       => 'ASC',
                'orderby'     => 'menu_order',
                'post_parent' => $project_id
                
    );

    You have to replace these with-

    $args = array(
                'post_type'   => 'task_list',
                'numberposts' => -1,
                'order'       => 'ASC',
                'orderby'     => 'menu_order',
                'post_parent' => $project_id,
                'orderby'        => 'post_title',
                'order'          => 'ASC'
    );

    Thanks.

    #66319

    Kerstin
    Member
    Post count: 6

    Hello Nayem,

    I can't find these code lines / the array in project.php. In my script, theres a comment in line 528(“Generates navigational menu for a project”)

    I found the function get_projects starting with this in line 263:

    $args = array(
    ‘post_type' => ‘project',
    ‘posts_per_page' => $limit,
    ‘offset' => $offset
    );

    in the following lines, the filter settings are checked and added to the query…

    #66321

    Nayem
    Moderator
    Post count: 6480

    Hello,

    Yes, you are in right place. Added them there.

    #66330

    Kerstin
    Member
    Post count: 6

    Hello again,

    it works, thank you! ๐Ÿ™‚

    There's another view, in which the projects are listed and where the alphabetical order would be great to habve, too:
    – My tasks

    Where do I find the code for this view?

    #66855

    Kerstin
    Member
    Post count: 6

    Found it: to order the projects on “My tasks” alphabetically, line 106 in /class/task.php hast to be modified.
    Instead of:

    ORDER BY project_id DESC";

    write:
    ORDER BY project_title ASC";

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

The topic ‘Project order’ is closed to new replies.