Hi,
thanks for your post, and sorry for the trouble.
For the first thing, you could use the approach from https://wordpress.org/support/topic/start-with-search-bar-only/
Changing the design is also possible, with CSS code, like
.dataTables_filter input {
color: #ff0000;
background-color: #00ff00;
border: 2px solid #000000;
border-radius: 10px;
font-size: 20px;
}
Regards,
Tobias
Thanks for answering
On the first question, what you have suggested to me is a search bar without data, you enter a piece of information and the information comes out.
The idea is that there is no data and select one put filters per column
Example.
Year column: 2019
Sport column: Soccer
Of course in the column year open there will be many more years and in the sport column there will be more sports, as if it were an excel filter
Thank you
Hi,
thanks for the explanation. Unfortunately, I don’t know an existing solution for that, sorry 🙁
Regards,
Tobias
Thank you very much.
I have to go testing.
Taking advantage, what code should be put so that in each row of the entire column the text is centered in height, in the row not in the column.
thanks.
Hi,
that’s usually possible with “Custom CSS” like
.tablepress thead th,
.tablepress tbody td {
vertical-align: middle;
}
Regards,
Tobias
Hi,
no problem, you are very welcome! 🙂 Good to hear that this helped!
Best wishes,
Tobias
P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!
Do not doubt that I will.
Last question for now since I’m doing everything and looking for options.
Is there any way that the table is sorted by one of the columns automatically? since if I sort the column by date it does not do well and I have a hidden column with a code that I created (2019.01 and so correlative)
So the idea is including information in the rows that when viewed it is placed by the hidden column …
thanks
Hi,
yes, for automatic sorting, you could try the TablePress Extension from https://tablepress.org/extensions/table-row-order/
Another option (for JavaScript-based sorting on the frontend) is to use a “Custom Command” (on the table’s “Edit” screen) like
"order": [ [ 3, "asc" ] ]
This would sort the fourth column (counting starts with 0) in ascending order when the page is loaded.
Regards,
Tobias
thanks
Last query I don’t want to disturb.
How can you put more than one extension in a table? I am putting filters and responsive columns and it only loads the latter, apart is it possible to eliminate the search option?
Hi,
normally, you should only have to add the different parameters to the same Shortcode – but not all combinations are compatible, unfortunately.
What exactly have you tried?
Turning off the search option is possible on the “Edit” screen (however, it is required for the filters. In that case, you can hide it with CSS, like
#tablepress-123_filter {
display: none;
}
).
Regards,
Tobias
This is the shorcode that I am using
[table id=1 datatables_columnfilterwidgets=true datatables_columnfilterwidgets_exclude_columns=2,3,5,6,7,9 table id=1 responsive=scroll responsive_breakpoint=”all” /]
extension: columnfilterwidgets – reponsive
Hi,
please try this Shortcode:
[table id=1 datatables_columnfilterwidgets=true datatables_columnfilterwidgets_exclude_columns=2,3,5,6,7,9 responsive=scroll /]
and make sure that both TablePress Extensions are installed and activated.
If it’s still not working, can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!
Regards,
Tobias
It does not work, the filtered option of columns at the top does not appear.
https://resultados.deporteadaptadocyl.org/?page_id=318
-
This reply was modified 5 years, 7 months ago by
chissco.
Hi,
thanks for the link!
It seems that this is caused by the “Custom Command”
"order": [ [10, "asc" ] ]
that you added. This does not make sense, as the table only shows 9 columns. Can you please try again after removing this “Custom Command”?
Regards,
Tobias