WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
[resolved] Styling for Table Printing (10 posts)

  1. drizzle
    Member
    Posted 2 years ago #

    What is the best method to handle CSS stylesheets for printing tables outputted by wp-table-reloaded? Thanks.

    http://wordpress.org/extend/plugins/wp-table-reloaded/

  2. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    thanks for your post.

    What exactly do you mean here?
    Do you already have such a stylesheet and just want to know how to include it? Or do you want to create such a stylesheet?

    Regards,
    Tobias

  3. drizzle
    Member
    Posted 2 years ago #

    Hi Tobias,

    I have a player roster table in one template and a game schedule table in another template, each of which is styled by its own secondary stylesheet. The roster template also has a print stylesheet so people can print the roster and take it to a game.

    Going forward, I'd like to manage the roster and schedule through your plugin. Your interface would make the tables easier to maintain. Plus I would like to add past season team pages to the site with each team's roster and schedule included, but styled differently than the current season.

    Thanks for responding to my question. Great plugin.

  4. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    thanks for the explanation.

    Then all you probably will need to do is change a few CSS selectors in your stylesheets. Or you could add the existing selectors as an "Extra CSS class" to the table. That way, you can re-use your stylesheets.

    Regards,
    Tobias

  5. drizzle
    Member
    Posted 2 years ago #

    Thanks Tobias. When a page/template containing a table is rendered, are the plugin CSS rules applied after the style.css and any secondary stylesheets? Seems like my printing CSS rules work best if added to the end of the plugin's custom CSS area rather than in my print css stylesheet. Best....

  6. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    that depends on your actual theme. Just take a look at the HTML source code (in your browser, click "View Source" or similar), where you can see the order in which the CSS files are loaded.

    Regards,
    Tobias

  7. drizzle
    Member
    Posted 2 years ago #

    Tobias,

    Yes, I see where the plugin CSS is added, but it seems to be added on all pages instead of just on pages that contain the tables. Any way to limit that....maybe like Justin Tadlock suggests here: http://justintadlock.com/archives/2009/08/06/how-to-disable-scripts-and-styles

    Thanks again...

  8. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    yes, you are correct, the stylesheets for tables are added on all pages. The reason for that is, that the plugin does not yet know if there are tables on the page, when the CSS needs to be included in the head of the page. In other words, the plugin does not know in the head, if there are Shortcodes for tables or the template tags in the page. That's why the CSS is included on all pages.

    If you really need to change this (although, due to caching, this generally is not a problem), I suggest to take a look at the HiFi plugin (http://wordpress.org/extend/plugins/hifi/), which allows you to add code to the page head. That way, you could load the CSS manually, on all pages that contain a table.

    Best wishes,
    Tobias

  9. drizzle
    Member
    Posted 2 years ago #

    Thanks Tobias. The tables are looking great. Thanks so much for this plugin.

    (Any way to turn on the plugin's css only on those pages in which a table is used..... in the same way that the Post/Page Tabs plugin can be turned on only on specific pages and posts?)

  10. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    no, as mentioned above, that is not yet possible with WP-Table Reloaded. I'm investigating reliable methods for this, so that the feature might be added in the future.

    Until then, I recommend to use the Hifi plugin.

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic