Support » Plugin: TablePress » Does not work with Rating Plugin?

  • Resolved niclasto

    (@niclasto)


    Hey,

    I am using the Rating Plugin ‘yet another stars rating’ and I have inserted a shortcode within a tablepress cell. Unfortunately, the rating within the cell can not be saved.

    Here is an example: https://prudentwater.com/rate/

    The first one is not in a table press cell but the second one is inserted in a tablepress cell. The first one works fine but the rating in the cell can not be saved. For me, it looks like tablepress blocks the saving of the voting.

    Thanks in advance!

    Regards,
    Niclas

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter niclasto

    (@niclasto)

    Hey,

    I have just tried whether the rating plugin works with WP Table Builder and it does. However, I would like to stay with TablePress. Do you know what makes the difference between yours and TableBuilder?

    Regards,
    Niclas

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    My guess is that TablePress output caching is involved here. Please test with that turned off, by using the extended Shortcode

    [table id=15 cache_table_output=false /]
    

    on this page.

    Regards,
    Tobias

    Thread Starter niclasto

    (@niclasto)

    Hi,

    it works, many thanks indeed!

    One more question: Is there a way to sort the table by the average rating? I would have the number as the average rating and not only the stars. I guess I would have to put the rating in a separated column, if it is possible at all?

    Regards,
    Niclas

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    good to hear that this helped!

    Yes, if you could put the average rating into a separate column, without anything else (like other HTML code) around it, we can do this with a “Custom Command”.

    Regards,
    Tobias

    Thread Starter niclasto

    (@niclasto)

    Hi,

    is it just a code I need for that and if so, do you mind sending me this one?

    Besides, is it absolutely necessary to put the average rating into a separate column, without anything else?

    Regards,

    Niclas

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    well, if you can get the average rating into a separate column (which we can however hide from the visitor), things are very easy. You can then use this approach: https://wordpress.org/support/topic/tablepress-sitereviews-sort-by-rating/#post-11472609

    Regards,
    Tobias

    Thread Starter niclasto

    (@niclasto)

    Hi,

    so far I could not make it work. That is how it looks like in tablepress-admin for the certain table.

    https://prudentwater.com/wp-content/uploads/2020/10/table2.png
    and
    https://prudentwater.com/wp-content/uploads/2020/10/table1.png

    Then I put this code in Custom CSS

    .tablepress-id-27 thead {
    	display: none;
    }

    However, this is the result so far: https://prudentwater.com/ter/

    Could you help me once more? Many thanks in advance!

    Regards,
    Niclas

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    you will first have to get the plain average number into a new column (this depends on the rating plugin you use). Only then does it make sense to start with this approach.

    You won’t need that CSS code then, so please remove it again. You will only need the “Custom Command”, something like

    "columnDefs": [ { "orderData": [ 2 ], "targets": [ 1 ]  }, { "visible": false, "targets": [ 2 ]  } ]
    

    Regards,
    Tobias

    Thread Starter niclasto

    (@niclasto)

    Hi,

    okay, many thanks for your help!

    Regards,

    Niclas

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    sure, no problem!

    Best wishes,
    Tobias

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Does not work with Rating Plugin?’ is closed to new replies.