• Resolved ncurrier

    (@ncurrier)


    Hi Tobias,

    Not a bug or extension request, just a question (and perhaps more rss-specific than Tablepress).

    My data tables are usually several hundred/thousand rows. They make my rss feed unusable (it becomes too big) even with just 5 articles in the feed.

    Have you ever heard of anyone successfully excluding Tablepress tables from their rss feed?

    Thanks,
    Nathan

    https://www.ads-software.com/plugins/tablepress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Nathan,

    thanks for your question, and sorry for the trouble.

    Just for clarification, are you seeing the internal TablePress data in the RSS feed, or are you referring to posts/pages that contain a large table (via the Shortcode)?
    In the first case, there’d clearly be a problem here, but I think that you mean the latter case. Then, we could maybe turn off the Shortcode parsing in the RSS feed, or we could hide all rows, except maybe the first 5 in the feed. For that, you could e.g. use this PHP code in your theme’s “functions.php”:

    add_filter( 'tablepress_table_render_options', 'ncurrier_hide_rows_in_feeds', 10, 2 );
    function ncurrier_hide_rows_in_feeds( $render_options, $table ) {
      if ( is_feed() ) {
       $render_options['hide_rows'] = 'all';
       $render_options['show_rows'] = '1,2,3,4,5';
      }
      return $render_options;
    }

    Regards,
    Tobias

    Thread Starter ncurrier

    (@ncurrier)

    That’s done it. Excellent. Many thanks.

    Hopefully others find this useful as well if they have large data tables like mine.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘excluding Tablepress from rss feed’ is closed to new replies.