• Resolved Morshed Alam

    (@sumon1068)


    As you are preparing for the next version, I would like to request for a new feature.

    From Dashboard>All Posts, we have the opportunity to sort posts based on Total Views, Today’s Views.

    But this feature isn’t available for the custom post type. So, I do this by appending query parameter such as&orderby=tptn_total&order=desc to the URL. Example:

    https://thoughtmight.com/wp-admin/edit.php?post_type=quote&orderby=tptn_total&order=desc

    If you’re okay to put an extra effort, thanks in advance.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Ajay

    (@ajay)

    Do you mean in the custom post type view?

    Please check this out

    Thread Starter Morshed Alam

    (@sumon1068)

    I’ve added the code but nothing’s happening.

    My custom post type is quote, so I added:

    add_filter( 'manage_edit-quote_sortable_columns', 'tptn_column_register_sortable');

    But it did nothing. Can you check it please in your installation?

    Plugin Author Ajay

    (@ajay)

    @sumon1068

    I just realised that I need to update the FAQ for this. Does this work?

    add_filter( 'manage_edit-quote_sortable_columns', array( '\WebberZone\Top_Ten\Admin\Columns
    ', 'add_columns_register_sortable' ) );
    Thread Starter Morshed Alam

    (@sumon1068)

    I tried this. It doesn’t work too.

    Plugin Author Ajay

    (@ajay)

    I’ll get this in the next version. You can track this issue. But, note that it won’t be immediate as I have a few other plugin releases to take care of.

    https://github.com/WebberZone/top-10/issues/149

    Thread Starter Morshed Alam

    (@sumon1068)

    Okay, take your time. But shouldn’t it be added on plugin file only? I mean why should we pile up our theme’s functions.php file?

    Please add the functionality by default, so we don’t need to add any code to our functions.php

    Thank you.

    Plugin Author Ajay

    (@ajay)

    That’s the plan. That’s why I have that in the repository. It will be there by default.

    Thread Starter Morshed Alam

    (@sumon1068)

    Thank you

    fatokuda

    (@fatokuda)

    I’m also interested in this question, I’ve seen it working fine but only on the wp-admin page. Now I want it to work outside of the homepage so my visitors can opt-in, for example: https://www.ads-software.com/?orderby=total_count&order=DESC
    then what should i do? Hope you can help, thank you

    fatokuda

    (@fatokuda)

    @ajay Can you help me

    Plugin Author Ajay

    (@ajay)

    Please can you create a new post in the forum for this as I think your question is different from what has been filed above in GitHub.

    I’m also not fully clear as to what you’re thinking of doing, so appreciate if you can also provide more details – and a link to your site then.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Feature Request: Custom Post Type Sorting’ is closed to new replies.