Git Product home page Git Product logo

Comments (6)

DobleD avatar DobleD commented on September 25, 2024 1

Thanks! :)

from simple-taxonomy-ordering.

kpu23 avatar kpu23 commented on September 25, 2024

Hi @uiliw,

You can order by name in the way your code shows (e.g. 'orderby' => 'name').

Is it not working? What's returned? I just tested a few different orderby's and they're all working on my side.

Let me know,
Kevin.

from simple-taxonomy-ordering.

uiliw avatar uiliw commented on September 25, 2024

hey @kpu23 !

Its always returning the plugin's order, no matter what i change, if i disable the plugin, it works how i want!

  1. First I enabled the two custom taxonomies i have, that is "Categoria" and "Linha",
  2. On taxonomies page i ordered how i wanted because on some pages they need to show like this order, but only in one place, in taxonomy.php's sidebar i placed that code above to order by name, and not by the plugins order.

I've tested differente orderby's also an nothing happens.. :/

from simple-taxonomy-ordering.

EvanHerman avatar EvanHerman commented on September 25, 2024

Hi @uiliw I believe the terms are filtered using the drag and drop order across the entire site due to the following filter:
https://github.com/yikesinc/yikes-inc-simple-taxonomy-ordering/blob/master/yikes-custom-taxonomy-order.php#L114-L116

You should be able to remove the filter where you need.

remove_filter( 'terms_clauses', array( $this, 'yikes_alter_tax_order' ), 10 );

from simple-taxonomy-ordering.

DobleD avatar DobleD commented on September 25, 2024

Old post but same problem here.

I need to call wp_dropdown_categories ordering by name but always returns the drag'n drop order.

I followed EvanHerman idea to disable the filter before calling wp_dropdown_categories but can access the yikes_alter_tax_order filter with $this.

The only solution i found is modifyng line 260 in yikes-custom-taxonomy-order.php to
$yikes_tax_order = new Yikes_Custom_Taxonomy_Order();
Now i can access the filter with global $yikes_tax_order;

Is it correct? There is another solution? otherwise, can you please modify your plugin for future versions?

Thanks in advance.

from simple-taxonomy-ordering.

EvanHerman avatar EvanHerman commented on September 25, 2024

@DobleD I've issued a PR against the plugin to update the main plugin file, which would allow removing the filter easier. See #20 for example code and to track progress.

from simple-taxonomy-ordering.

Related Issues (17)

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.