Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
- This topic has 31 replies, 4 voices, and was last updated 8 years, 8 months ago by
Linda Everett.
-
AuthorPosts
-
12/20/2014 at 4:11 pm #313213
David Rogers
ParticipantHi Steven,
If it’s manually hard coding the category orders in the template I can probably do that myself. Can you point me in the right direction as to where in the tiles-plus template the Category menu is built?
Also still very happy to help fund the creation of the ability to drag and drop the order of categories in the back end that would then be reflected in the front end.
Thanks,
David
12/21/2014 at 10:09 am #313257Steven Zahm
Keymaster@ David
The select can be hard coded in the
tile-plus.php
file found here:
../wp-content/plugins/connections-tile-plus/
The section of code you need to change is in the
categorySelect()
function. You can echo out a custom ordered drop down. Probably the easiest thing to do is copy the drop down from the page source and past it in there, echo’d and change the options order to suit.I can’t add a admin UI for drop and drag ordering yet because there is not a why for templates to a=have their own settings yet. I was thinking more along the lines of a shortcode option.
12/22/2014 at 7:03 pm #313307David Rogers
ParticipantHi Steven,
That approach worked great, thank you! I’ve now got it working.
Do you have any suggestions as to how to approach the manual ordering of the categories listed on the card-single.php view? The difference is that not all categories would be shown on every card.
For example, one person might just have the PreK and K5 categories, while another might have K5, 6th-8th, and 8th-12th. It would be great to have them listed in the same order as the category select menu.
Appreciate your help,
David
12/26/2014 at 11:06 am #313406Steven Zahm
Keymaster@ David
Sorry, no, I can’t think of anything … maybe your categories can be hard coded into the template in the order you want them as an array variable and any categories that are not assigned to the entry can be unset from this hard coded list and then the list displayed. The net result would be the entries assigned to the entry in the order you hard coded in the template.
Hope that makes sense!
01/09/2015 at 5:37 pm #314629David Rogers
ParticipantHi Steven,
RE reply #313257 – Is it possible to modify this by duplicating the tile-plus.php file in our theme rather than modifying the core code directly?
Thanks!
01/11/2015 at 3:22 pm #314709Steven Zahm
Keymaster@ David
Sorry, no, the
tile-plus.php
can’t be overridden; only thecard.php
,card-{slug}.php
and CSS files can be overridden.01/11/2015 at 5:37 pm #314710Steven Zahm
Keymaster@ David
You mention funding this feature previously … what about funding a custom shortcode option that’ll meet your needs. I can write an extension for Connections that’ll add a new shortcode option that could custom order the categories. Simply you would add the category ID/s in the order you wish to have them presented. The only limitations that I can think of is that only the categories listed in the order would be included, meaning any category listed would not be displayed at all. And the listed categories would not be presented in a hierarchy, which from you description of you needs thus far would not be a problem.
01/12/2015 at 12:49 pm #314729David Rogers
ParticipantHi Steven,
We’d definitely be interested in funding that functionality. Could it be made available to both the “select” drop down search menu in the card.php view as well as the individual listings on the card-single.php view?
Thanks so much,
David
01/13/2015 at 1:32 pm #314803Kim Dumas
ParticipantHi Steven,
I think this is something we could use also. Can you give me an idea of what it would take to be able to sort the categories the way we want. How much money? Is it an extension that we could purchase?
We purchased the cmap template.
We are building a tutor site and we would like to sort the categories similar to this:
Gender
-Female
-MaleSubjects
-Pre-Algebra
-Algebra I
-Algebra II
-Geometry
-Trigonometry
-Pre-Calculus
-Calculus
-SAT Math Test Prep
-ACT Math Test PrepLanguages Spoken
-English
-Spanish
-FrenchThanks in advance.
Kim
01/13/2015 at 7:48 pm #314825Steven Zahm
Keymaster@ David and Kim
My apologies but this is going to be long.
I spent the better part of yesterday afternoon investigating ways to accomplish this effectively. One thing I learned … most of the plugins that do this for the core WordPress posts categories (any taxonomy) I could never recommend. It seems the majority of them add additional column to the core terms table. Altering core tables like this, one word, bad. What if WordPress ever updates its db structure (which btw they are planning it). This could leave you in a situation where you would not be able to update or the update trashing the db because of an unexpected structure. Any way… apologies for going off topic.
It seems the best way to do this would to do it how this plugin does it with the WP core categories (no, it will not work with Connections, sorry). It creates a term meta table and stores the order there. What’s great about this approach is any arbitrary data then can be assigned to a category, ie images. Basically infinitely extensible.
The downside would this would cause additional db queries which will have an affect on page loads in the realm of ~hundredth of a second per category (this would include the time required to do a post query quicksort to put them in order). The plugins that add to the core terms table would not suffer this effect but as mentioned, could be very risky, and is limited to only adding the order, no other data.
What I was originally thinking for @ Dave was a shortcode option, lets call it
category_order
. I was think it would be used to manually set the order like so:
[connections category_order='2,5,6,1,8,10']
The numbers represent the category ID as found on the Connections : Category admin page.
The downsides (and they are large downsides) with this approach would be, only the categories listed in the shortcode would be shown and the hierarchy would be lost. So @ Kim, this would not be a workable solution for you. Additionally anytime you added and removed a category you would have to go back and edit the shortcode accordingly. For @ Dave, even with those limitations it seems like a workable solution.
My preference would to be to add the terms meta table to the core Connections plugin and create an extension to set the category order. Now custom development is not cheap. We’re looking at a $150 to $200 from the each of you with me crossing my fingers that sales of the extension would have enough interest to recoup the rest of the cost. The cost is high because there is quite a bit of work and time involved in adding a new table and the supporting functions for reading and writing to it.
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.