Giter Site home page Giter Site logo

default-sort-ascend's People

Contributors

rdsteed avatar

Watchers

 avatar  avatar

default-sort-ascend's Issues

Apply to another field?

Hi Dennis!
I use a WP extension called Sliced Invoices which doesn't have a way to set the default sort order. Would it be possible for me to adapt your script to force my preferred sort order and column type?
I don't mind if it has an effect on any other page, Sliced Invoices is the only thing I use my WP installation for.

If I manually click the column heading I want, this is the resulting URL:
https://www.(hostingdomain).com/wp-admin/edit.php?post_type=sliced_invoice&orderby=sliced_number&order=desc

If I look in the Chrome inspector, I can see this:
<th scope="col" id="sliced_number" class="manage-column column-sliced_number sortable desc"><a href="https://www.(hostingdomain).com/wp-admin/edit.php?post_type=sliced_invoice&amp;orderby=sliced_number&amp;order=asc"><span>Number</span><span class="sorting-indicator"></span></a></th>

I'm guessing the important details here are id=sliced_number (and order=desc), though I couldn't see where to put that in your script.
Any tips?

All the best!
Dax.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.