Hey everyone!
With the holiday season upon us, we want to share our upcoming working hours:
- New Year: Our team will be off on January 1st and 2nd. We’ll be back on Friday, January 3rd, to respond to any messages received during this time.
- Weekend: As usual, we don’t work on weekends, so January 4th and 5th will also be non-working days.
- Orthodox Christmas: Our office will be closed on Monday and Tuesday, January 6th and 7th for the holiday.
After that, we’ll return to our regular schedule and assist you as quickly as possible.
In the meantime, you can explore our documentation for Amelia and wpDataTables. You'll find tons of helpful resources, including articles and handy video tutorials on YouTube (Amelia's YouTube Channel and wpDataTables' YouTube Channel), which might just have the answers you need while we’re away.
Thanks a bunch for your understanding and support!
Warm regards and happy holidays!
TMS
Hello,
My site is based on a single table of data. Each blog post would display that one table with its own pre-filters applied. I see there are two ways to pre-filter 1) by filtering the column and saving that to the table. This works, but it means I have to reload the same table 100's of times for the 100's of blog posts I planned. 2) is by pre-filtering with the URL, this seems promising as you can have just one table with the filter params coming through the URL. However, I don't understand how the URL with the pre-filters would be indexed by search engines. I may be missing something really obvious.
An ideal solution would be to be able to add filter params to the shortcode for the table. Does that exist?
Hi Alice,
Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.
-
1. First i will advise in general how SEO cralws our Tables, it depends of the table type.
Tables are crawlable by search engines but they are somewhat limited.
When you have pagination in a table,
Manual, imported, and MySQL query-based tables with server-side processing will only show the content of the table's 1st page.
For example, if you set that the table shows 10 rows per page by default ( in the table's Display settings),
Google and other search engines will only be able to see that page, and those first 10 rows,
while the other pages of the table won't be crawlable.
On the other hand, tables linked from source data ( such as Excel, CSV, Google Spreadsheet, XML, JSON, and PHP tables) are fully crawlable since they fetch all the rows,
output the entire table to the front-end all at once, and then split it into pages using JavaScript;
all data processing (page switching, sorting, filtering) is done on the client’s computer by JavaScript.
If you wish to pre-filter and just have SEO see the filtered data,
If you have a linked table, you will not be able to see just the filtered data because (as mentioned above) all data is already output to the front-end, and the filtering is done by the client's computer,
but all data is still there.
You'd need a server-side table that uses server-side processing for filtering in order to see only the filtered data, but even in that case - it will only see the first 10 (or how many rows you configured to be default) rows. For example, if you take a look at this page: https://wpdatatables.com/documentation/creating-wpdatatables/creating-mysql-based-wpdatatables-with-server-side-processing/ when you view the source, you will only see the first 10 rows.
2. How the SEO/Search Engine will load the data while pre-filtering via URL :
When we use filtering via URL, the SEO will still see all the table data,
because in this way, the table is filtered after the source for server-side tables has already been filled,
and the filter URL is being populated in the AJAX call.
If you need the SEO to only see the filtered rows, you can only use placeholders as filters,
because they are being loaded as filtered right away.
And as we mentioned, for server-side tables, the amount of rows that show in the table will be rendered,
depending on what is set as default display length on the back-end.
3. And i did not fully understand everything you described for the Placeholders for filtering predefined in the tables.
So, we will elaborate a bit more what are your available options, multiple ways how you can use our dynamic Placeholders to pre-filter tables, via shortcode or via SQL Query.
We already mentioned the pre-filtering via URL.
You can also use placeholders for table generation.
1. For example, if you have a MySQL query-based table, you can use this query:
%VAR1% can be defined in the Placeholders tab when you're creating a table,
or you can pass a different VAR1 value in the table's shortcode.
2. Or, if you don't add the condition in an SQL query ( or don't use an SQL Table),
you can add %VAR1% in column settings -> Filtering, under "Predefined filtering value".
Then, you can have different versions of the same table, with the VAR1 value passed in the shortcode,
let's say if we had a "Regions" column and we wish to filter a different region per each page.
If we want page 1 for example only filtered for "Region A" , you can set predefined filter to this column as %VAR1% (filter type has to be set as text) :
Then for a page where we need only Region 1 filtered, use shortcode [wpdatatable id=1 var1='Region A'] ,
page 2 for only "Region B", shortcode would be [wpdatatable id=1 var1='Region B'] and so on,
to apply the values defined in the shortcode to the filter.
( This filtering method can be used for any table type, besides Simple Tables)
Another way can be by pre-filtering with Placeholder %CURRENT_POST_ID%,
if you will have a Column in your Table that will store Post ID from each row.
Please check if you set an existing Post ID from your WordPress to the placeholder of this table.
It is needed to be set in order to initially generate the table - then it will dynamically change on the front end according to the current Post ID.
Here is my Test example.
I choose any random post id from my existing Posts, and place it as this SQL Table Placeholder "current post id", just to be able to initially generate the table.
This is how my source data looks ( without any filtering):
Now i create this new SQL Query table :
-
You can easily check any Post ID by going to Posts > Edit a Post > And on top you will see it
-
I chose any existing Post ID, and set it in Table's Placeholders Tab as "Current Post ID" :
-
Then, if i open a Post with this table's shortcode, it is going to dynamically change, and it will filter the table by the current POST ID :
-
This is the front-end of the table loaded on that Post, it filters only the rows that match the value of the current POST ID :
Let me know if that helps.
Thank you
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables