Hi,
thanks for your post, and sorry for the trouble.
Please try
[table id=1 hide_rows="all" show_rows="1-8" /]
This should then only show rows 1 through 8.
Please try making these changes in the “Text” and not the “Visual” editor to prevent that other HTML code gets added accidentally.
Regards,
Tobias
That did it.
Why do you have to include the hide_rows snippit into the code?
Hi,
basically, we’ll first have to hide all rows (as showing all rows is the default) and then re-show the desired rows.
The show_rows
parameter is basically honored in addition to whatever visibility state has been set before. So, when all rows are already visible (by default) nothing changes. That’s why we have to hide everything first.
Regards,
Tobias
Hello! I am having the same issue and this coding does not work for me. Any thoughts as to why?
Here’s the webpage: https://sites.tufts.edu/mediastockroom/cables-adapters/
(Note the “cables” table has 3 pages).
This is what I have typed:
[table id=5 hide rows=”all” show_rows=”1-28″ /]
Thank you!
Hi cassandraklos,
I’m not sure what you mean. This Shortcode would first hide all rows and then again show the rows 1-28 (where “show” means “send to the browser”).
This is what I see on that page.
What exactly is not working here?
(Even though 28 rows are sent to the browser, you can only see 10 at a time, as you are using pagination by the FooTable plugin.)
Regards,
Tobias
-
This reply was modified 3 years, 7 months ago by
TobiasBg.
Hi Tobias,
Thanks for your help! I guess I mean, I would like to see all rows without going to another page. On the bottom of the table, it has a >>2>> and >>3>> button… at least that is what I’m seeing!
Thanks,
Cassandra
Here is a screenshot of what I’m talking about:
http://imgur.com/a/cMcMk
Thank you!
Cassandra
Hi Cassandra,
thanks for the clarification!
What you are seeing there are the (broken) pagination controls of the FooTable plugin. To get rid of these, please deactivate/uninstall the FooTable plugin (if you are not using it anywhere) or at least turn off the TablePress integration in its settings.
Regards,
Tobias
Hi!
This shortcode I just discovered and is very helpful when using variations of one table.
However, I notice that the order the id is added to the shortcode is ignored and is instead sorted by the original table id itself.
For example if I put: [table id=1 hide_rows=”all” show_rows=”1,65,2,3,4″ /] it will still display the table in the following order: 1,2,3,4,65. Or am I thinking completely wrong here?
The problem is when fetching id:s like this in my situation is that if I want to add a new row to the “mother table” and then move that new row to the top it will change ALL id’s and thus add rows on existing pages where I have fetched from the mother table with this short code that should be there.
So problem is that when I add a new row I must be able to leave it at the bottom but still move it to the top on some pages with this shortcode which I dont seem to be able to do.
Sorry, tried to explain to the best of my ability but maybe its too confusing?
Hi,
the show_rows
parameter will indeed not respect the order that you chose. It really only uses the information to find which rows to display, in their natural order.
If you want to keep the order, you could use the TablePress Extension from https://tablepress.org/extensions/table-row-order/
This also has a parameter that allows to set an actual order:
[table id=123 row_order=manual row_order_manual_order=1-3,6,3 /]
Regards,
Tobias
Wow awesome, thank you so much for the reply! This will be very useful.
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!
I have a client who whats to remove the default option of showing 10 rows and start with showing 25 rows. Is there a way of doing this? Thanks.
Hi,
thanks for your post, and sorry for the trouble.
Just change the 10 to 25 in the “Features of the DataTables JS library” section on the table’s “Edit” screen.
Regards,
Tobias
Hi Tobias,
First off, thank you very much for building such a fantastic plugin.
I am using Tablepress at this page: https://hdpowerequipment.com/caterpillar-engine-model-numbers-prefixes/
Basically, I do not want to show any rows except for the search box (or only one row if displaying zero rows is not possible). I only want to show the filtered rows after the user has entered their search criteria into the search box.
Is this possible? I have tried the suggestions listed in this thread but they do not seem to work in my situation.
Any ideas?