You are here:  » Disable related in rss feed


Disable related in rss feed

Submitted by marco@flapper on Tue, 2014-05-13 14:03 in

Hi,
I set $config_useRelated to true.

Lately I checked on RSS feeds of my wordpress site and noticed they were very slow. More than 10 seconds.

I checked by setting $config_useRelated to false and rss feeds loaded in 5 seconds.

Is there a way to disable $config_useRelated to be true for the posts but false for the rss feeds.

Submitted by support on Tue, 2014-05-13 14:08

Hi Marco,

Can you post an example of the product page URL, and the corresponding RSS feed URL (i'll remove before publishing your reply)...

Thanks,
David.
--
PriceTapestry.com

Submitted by marco@flapper on Tue, 2014-05-13 15:07

Hi,
This is the rss feed I'm working on:
{link saved}

If you check it in internet explorer you can see that the related products are shown for every rss item.

For example:
{link saved}

Submitted by support on Tue, 2014-05-13 16:51

Thanks Marco,

How are you specifying which products are included in your feed? There's no link from the example product page to the feed, so, for example, are you entering product page URLs into an administration page for the feed you are building?

Thanks,
David.
--
PriceTapestry.com

Submitted by marco@flapper on Thu, 2014-05-15 08:49

I use a wordpress category feed like
http://example.com/category/foo/feed

I added pt shortcodes (pto prices, pto search, pto related) to the wordpress posts so that's how pt information get's into the RSS feed.

The problem is that though I like the added information in the wordpress posts it makes the rss feed extremely slow.

It it possible for the shortcode information to show in wordpress posts but not in the rss feed?

Submitted by support on Thu, 2014-05-15 11:58

Hi Marco,

No problem! There is an is_feed() function in the WordPress codex, so this can be used to disable PTO shortcode processing if TRUE.

To give this a go, edit pto.php and look for the following code around line 394 at the top of the pto_core() function:

  $html = "";

...and REPLACE with:

  if (is_feed()) return;
  $html = "";

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by marco@flapper on Fri, 2014-05-16 07:38

Thanks David.

The rss feed load time was reduced significantly.