-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional [staff-directory] title parameter #19
Comments
staff-directory-shortcode is the page in which you can add something before each loop starts. |
@dmkjr I'm not sure to have understood what you mean: as far as I konw |
@delitestudio Are you trying to add something before each individual staff entry? Or before each group/category of entries? As well, are you wanting to add a specific string, or a string unique to each listing? If you wanted a unique title for each individual listing, you could go to Does that answer your question, or am I misunderstanding? |
Hi @TurqDevDesign I'm trying to add something before each group of entries. I've tried to add something static before Another problem is that this kind of field cannot be bound to single staff entry but it must be unique for each group. This is the reason I've thought it can be a sort of title for each group of entries and well suited to be a parameter for the As an example, if I have some entries with category student, some with teacher category and no one with admin category, I want to be able to use:
And have this result:
I think we can insert something like this to achieve the behaviour:
But the output will be:
As you can see there will be a title without any content. The only way to be able to output what we'll expect is to alter the way the plugin outputs the HTML code for each |
It seems to me that more appropriately there would be the option to print the Category. While having a title attribute provides even more flexibility it is completely disconnected from the category chosen. A shortcode attribute that turns on Category printing (with perhaps a Category/Title template for defining the desired output) would be a more automated implementation that would provide more consistency. There could even be a plugin level option that you could globally turn on category titles be output so you wouldn't even have to set it at a shortcode attribute level. If @adamtootle or @delitestudio have other suggestions I might work this up and submit a PR over the next few weeks. We're actually doing something similar to this (i.e. the manual way) on a site I manage (https://www.daybreak.tv/our-team/) so this would actually simplify a portion for myself as well. |
@adamtootle I can start to work on this however I notice that there has not been any updates to the plugin in the last 7 months and curious about your long term plan is. I'd be happy to take the lead on this plugin if you're open to it. |
Hello, in our use case of your great plugin we have the need to insert a title over every table generated by the [staff-directory] shortcode.
For example we need to dynamically implement a layout like this:
Is there a way to do this in a clean way? At the moment we have overwritten the class StaffDirectoryShortcode supporting a new title argument but it will be a good idea to have this feature in the official release.
The text was updated successfully, but these errors were encountered: