• Resolved grios

    (@grios)


    Excellent plugin!

    I am currently trying to load tablepress tables inside ajax tabs ( Hello Ajax Tabs plugin ) and all I get is the shortcode text in the tab. I assume this is due to the same evaluation functions or some such. Is there a way to change the Tablepress loading order to get the table to load after the tabs? Thank you!

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    This is a little bit tricky. TablePress is indeed not active during AJAX requests (because that is usually not necessary). In your case, this might however be a valid use case. I’ll therefore need to look at the Hello AJAX tabs plugin in more detail, to see what exactly it needs.
    I’ll reply again later, once I’ve had time to investigate this in more detail.

    Regards,
    Tobias

    Thread Starter grios

    (@grios)

    Thank you! I appreciate you taking the time to investigate.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    sure, no problem! I’m also interested in this personally. I’m pretty busy at the moment, but should have some results this weekend.

    Regards,
    Tobias

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    I have now looked into this a little bit, but could not go too deep, as Hello AJAX Tabs seems to be a commercial plugin, so that I can’t dive into the code.

    The best way to fix this issue for you should be some custom code, that basically tells TablePress to load its Shortcode routines on such AJAX requests as well. This is not guaranteed to work 100%, but it should. Please try adding this to the “functions.php” of your theme:

    add_action( 'tablepress_run', 'tablepress_hello_ajax_tabs_loader' );
    function tablepress_hello_ajax_tabs_loader() {
      TablePress::load_controller( 'frontend' );
    }

    Regards,
    Tobias

    Thread Starter grios

    (@grios)

    Thank you Tobias,

    I tried the code you suggested, added as is into the theme functions.php
    Result was I got the following error in place of the table inside the ajax tabs:

    Fatal error: Call to undefined method TablePress_Admin_AJAX_Controller::shortcode_table()

    I should note that here I’m calling the table via php inside a shortcode from a membership plugin, hope this helps with any possible solutions.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for trying. That’s a strange error and I’m not really sure why this is happening then 🙁

    Can you show me in more detail how you are calling the table?

    Regards,
    Tobias

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Loading Tables in Ajax Tabs’ is closed to new replies.