• Resolved jgrosso

    (@jgrosso)


    I am using Wp 3.1 and WP Table Reloaded 1.9.1. I have a table on the following page I am working on( https://executrans1.com/wordpress/?page_id=141 ) and yet the table does not display. I have used WP-Table Reloaded (which is an AWESOME plugin btw) on other sites without issue so I am not sure what would be causing this. Might you be able to help? Thanks in advance!

    -Jason

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

    (@tobiasbg)

    Hi Jason,

    this likely is a theme issue.
    I have a feeling that the theme is not using the WordPress template tag the_content() correctly on that page. Is that page maybe using a custom page template?

    Also, could you temporarily try with the WordPress Default Theme “TwentyTen”, to see if it works there?

    Regards,
    Tobias

    Thread Starter jgrosso

    (@jgrosso)

    Tobias, you would be correct. The template is using a custom page template. Any ideas how to get it to work? Ill try it with twentyten, however my suspicion is it will work fine on that one just like it has worked fine on numerous templates in the past. BTW, AWESOME plugin ya made!

    -Jason

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Jason,

    ok, thanks for checking this.

    The solution basically depends on what the page template uses to display the content on the page. Does it use the template tag, or does it directly use a property of the $post variable in the loop?

    Can you post the PHP code of the page template in a pastebin at https://www.pastebin.com?

    Regards,
    Tobias

    I’m sorry if I’m hijacking this thread/question, but I feel my problem is (very) closely related.

    My ‘theme’, which is actually a plug-in that creates a static page for viewing my blog on mobile devices, uses this to get the content:

    $content = get_the_content();
    $content = apply_filters(‘the_content’, $content);

    Shouldn’t this be enough to get the tables to display? I mean, shortcodes from other plug-ins are replaced by the correct code, but shortcodes referring to tables are not replaced at all.

    Do we need to apply a different filter?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question.

    Yes, this should actually render all Shortcodes and replace them with content.

    WP-Table Reloaded is in that regard however a little “special”, as it only registers its Shortcodes when the site (i.e. WordPress) is being access from the frontend.
    I have a feeling that in your case, that plugin creates the static pages through accessing the backend. Otherwise I don’t really see why the table Shortcodes are not replaced.

    Can you somehow check this? What does a call to is_admin() that is placed in the vicinity of the lines you posted return?

    Regards,
    Tobias

    Hi Tobias,

    Indeed, it returns 1. Is there a way to ‘force’ WP-Table Reloaded to replace the shortcode?

    Thanks for your answer,

    Sander

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ok, thanks for checking this.
    That explains, why this is happening, the Shortcodes are simply not registered.

    To have them registered, you will need to load and instantiate the Frontend controller class.
    This might be as easy as modifying the main file “wp-table-reloaded.php”, by modifying the if (is_admin()) conditional to load the frontend part regardless of the conditional.
    (I have however not tried this, so I don’t know what might be happening ?? )

    Regards,
    Tobias

    Well, my server just exploded…

    Nah ?? it worked!

    Thanks a lot!

    Sander

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Sander,

    awesome, good to hear that it was so simple! ??

    And thank you very much for your donation, I really appreciate it!

    Best wishes,
    Tobias

    Hi Tobias

    I seem to be having a similar issue but I do not understand how to resolve it from this thread. I wrote to you not too long ago because I am running a Studiopress child theme (Church) on the Revolution Framework (https://www.studiopress). I had written to you because I could not get the donation can shortcodes to work with WPTR. The solution was to add
    add_filter( ‘wp_table_reloaded_cell_content’, ‘donation_can_content_filter’ );

    to my functions.php file. Everything seemed to work fine after that, but this morning, I checked the site and the tables are not displaying on the front end. I can see the table content, but it also does not display when I click the preview button on the WordPress back-end/dashboard.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    what are you seeing instead of the table? Can you provide a link to a page where this is happening?

    Regards,
    Tobias

    I just see the table cells with no content in them, although the content is there in the dashboad (but is also not viewable through the preview button).

    https://www.antiochlex.org/ministries/womens-ministry/
    and
    https://www.antiochlex.org/give/

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for the links!

    That’s interesting! Basically it means that the donation_can_content_filter function that we used to get the Shortcodes to work has changed its behavior. Did that plugin maybe get an update?

    (And just to be sure: Are you using any other plugins that somehow use WP-Table Reloaded?)

    Regards,
    Tobias

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    me again. I just took a look at the development log of Donation Can and it looks like the new version from a few days ago has been entirely rewritten.
    The plugin does now use regular WordPress Shortcodes and no longer needs that workaround with the

    add_filter( 'wp_table_reloaded_cell_content', 'donation_can_content_filter' );

    So, just remove that, and you should see the contents of the table again. And on top, the [donation-can] Shortcode should work out of the box ??

    Best wishes,
    Tobias

    You are the greatest, Tobias. That worked. Thank you.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘[Plugin: WP-Table Reloaded] Table not displaying’ is closed to new replies.