Support » Plugin: wpDataTables - WordPress Tables & Table Charts Plugin » Filter term using shortcode

  • Resolved ramanandmehta

    (@ramanandmehta)


    Hi thank you creating such an amazing plugin.
    Actually I am working in a big data table and for now there are more then thousand rows (this is increasing day by day).
    I am adding table using shorcode- [wpdatatable id=1]

    this shortcode insert all table data (all rows) but I want to insert after filter by word or phrase. for example I will show all the row in which I have used “car”

    [wpdatatable id=1 filter=car] I tried this shorcode but this not worked.

    I want that when I use this type shorcode all the rows will got inserted in which I have used car word and all row/column should be visible in html page source.

    Is there any way to achieve this?

    second thing Is that, are you focus on SEO? As I can see when I insert a table using this shortcode, I see all rows but when I view page source I see only 9 rows data. I think this is not good seo practice.

    You should also focus on what search engine crawlers see along with what users see on the website.

    pagination is good but inserting all table data in HTML source is important.

    How can I do that? please help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author wpDataTables

    (@wpdatatables)

    Hello there.

    Thank you for reaching out to us.

    You can add a placeholder as a predefined filtering value to a column (in column settings). For example, you can add %VAR1% as a predefined filtering value. Then, change the shortcode to [wpdatatable id=1 var1=car] and the column that has %VAR1% as a predefined value will be filtered per “Car”.

    Server-side tables pull only the values that are displayed on the first page of the table using admin-ajax calls, and only that is crawlable by search engines. Non-server-side tables (tables linked to existing sources) pull the entire table on the page, and split it into pages using JavaScript – those tables can be searched for in their entirety, but the bigger those tables are, slower the page will be.

    Kind regards.

    Thread Starter ramanandmehta

    (@ramanandmehta)

    Thank you for your response, sir,
    predefined filtering value method is working fine. but again issue for SEO.
    loaded table data on the frontend are not the same on the backend when I view page source.

    I changed max no. of the row to display to 25 and it’s working on frontend, but on page source, there are only 9 rows data. and also these 9 rows data are different from loaded data on the frontend. actually here first 9 rows of whole table data got added.

    just I want to do that, after loading table data by filter, same data source code should be available for the search engine crawlers.

    Thanks, hope I will get a positive responce.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Filter term using shortcode’ is closed to new replies.