Filter Category Order

I would like our portfolio filter to be in a certain order, and not alphabetically.
Please can you help?

Here's a link to our site with the filter http://peripericreative.co.za/wp/video_concept/we-did-that
We want the order to be Websites, Logo & Designs, Identity, Prints & Ads, Other.

In what file in the code can I make the changes?
I know PHP well.

Thanks in advance,
Regards,
Luana

Comments

  • Hi Luana,

    we are very sorry but we do not have any option to order these categories. If you know PHP well, then you can play with functions/theme-shortcodes.php file where all items/shortcodes are.

    Thanks!
  • I use this colution:

    Insert numbers in your categories name, so that they so that they appear in your desired order.

    Example:
    01-Categoryname1
    02-Categoryname2
    03-Categoryname3

    Then with Javascript remove the first 3 characters (2 numbers + the -):
    (function($){
       jQuery(".filters_wrapper .categories li a").each(function()
       {
          this.text = this.text.replace(/^[0-9][0-9]\-/,"");
       });
      
    })(jQuery);

    Not perfect, but works :-)
  • Thanks for explanation! :)
  • Thank dimizu.... works also for me :-)
  • edited August 2018
    Thanks dimizuWorked perfectly! 


Sign In or Register to comment.