WordPress.org

Forums

TablePress
[resolved] shortcodes and color of tables (4 posts)

  1. scalley
    Member
    Posted 2 years ago #

    Hello I have 2 questions to ask. I want to use a plugin that integrates ratings in shortcode in to a table and when I input the shortcode it doesn't seem to work. I've read earlier posts and you said it should work out of the box unless the plugin doesn't follow the standards. Here's the plugin http://wordpress.org/extend/plugins/star-rating-for-reviews/

    The shortcode I'm trying to use is [rating:4] for example. The next part of this question is will tablepress be able to sort this in a column?

    The 2nd question I have about color is I've already changed the body and the headers of my tables to black with white font but I was not able to figure out how to change the very top part of the table (where it displays show entries dropdown and the search section). What code would I put in the css to change this section?

    Thanks in advance!

    http://wordpress.org/extend/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    thanks for your question.

    The "Star Rating for Reviews" plugin is one of those that does not follow the standards (probably, because it is so old). To make those Shortcodes work in TablePress, please try adding

    add_filter( 'tablepress_cell_content', 'sr_addstar' );

    to the "functions.php" of your theme.
    Whether you will be able to sort on this, depends on the output that the rating plugin generates. Making this sortable might require some extra work.

    Ragaring the color: This is possible with some CSS code, but to be able to tell you that code, I'd need to take a look at the page. Can you post a link to the page with the table, please?

    Regards,
    Tobias

  3. scalley
    Member
    Posted 2 years ago #

    Hey Tobias, I added that line after another add_filter in my functions.php and it blew up my site lol. I can't access the control panel anymore and get this error
    Parse error: syntax error, unexpected T_FUNCTION in... in my functions.php file

  4. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    oh, sorry about that.
    The code above is correct, so I'm not sure what happened...

    To fix this and to restore your site, you'll have to log in via FTP and revert the change there.

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • TablePress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic