Hi,
thanks for your question.
This is not so easy unfortunately.
While the plugin will load its JavaScript only when there is a table on the page (except for the jQuery library which will be loaded on all pages), this is not the case for the CSS however.
To have all scripts/CSS load only on one page, you will need to manually load them in your theme’s header, surrounded by a check on whether the current page is the one that shall get the CSS applied.
The best way to do this is to copy the resulting code from the current HTML of the page and then deactivate the automatic loading of the CSS within the plugin.
Then, paste the copied code into the header, surrounded by check with the WordPress function “is_page()”.
Regards,
Tobias
thanks 4 quick reply 🙂
hmmmmm there is no easy function except separete header & if else to check the page !
I saw on some plugin (dnt remeber name some contact form)
for that we can add 1 line of function to config or theme function file to automatically stop loading on all pages by which it load its scripts & css only on page in which it is used. Which is very useful to improve site performance by stop loading unnecessary javascripts.
If U can add such functio or add this option to plugin setting in later versions then its useful & also improve site’s other pages performance
Thanks again…
Hi,
yes, I have seen that in the Contact Form 7 plugin.
While the feature would certainly be useful, I don’t think that the implementation would work reliably for WP-Table Reloaded.
The problem simply is that the plugin doesn’t know if a page will contain a table, when it needs to loads the CSS/JS.
And there are several possibilities to load a table (Shortcode, Template Tag, text widget), the detection is not easy.
So, at this time, the only chance to achieve such a conditional loading is to do it manually.
Regards,
Tobias
@tobias: Thanks
as ur the author so u knw well about functionality 😉
nw I will go with the conditional page function