Title: Time_quantity issue
Last modified: January 15, 2020

---

# Time_quantity issue

 *  Resolved [alanghenassia](https://wordpress.org/support/users/alanghenassia/)
 * (@alanghenassia)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/time_quantity-issue/)
 * Hi, we are using the plugin in order to generate a feed with popular post data.
 * We are experiencing an issue when using the parameter “time_quantity”. When we
   set it to “72” the description balise is always sending the same picture.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftime_quantity-issue%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/time_quantity-issue/#post-12328066)
 * Hi there,
 * Can’t say what’s going on without looking at your code so please share it here(
   use pastebin.com) so I can have a look.
 * Also, what do you mean with “the description balise is always sending the same
   picture”?
 *  Thread Starter [alanghenassia](https://wordpress.org/support/users/alanghenassia/)
 * (@alanghenassia)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/time_quantity-issue/#post-12336955)
 * Hi thank you for your support.
    Here comes additional details about the bug. 
   When using the REST “/popular-posts” web service, the returned XML content always
   return the first article image URL in the “<description>” tag, within the “channel.
   item” tag. Indeed, this “<description>” tag contains some HTML starting with “
   <img src=” statement and the “src” attribute is set to the same value for all
   articles. I attached an excerp of web service response body.
 * Do you think that you can fix this bug, please?
    Best regards. Alan
 * _[ HTML deleted, don’t post that here ]_
    -  This reply was modified 6 years, 4 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
    -  This reply was modified 6 years, 4 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [6 years, 4 months ago](https://wordpress.org/support/topic/time_quantity-issue/#post-12337028)
 * [@alanghenassia](https://wordpress.org/support/users/alanghenassia/) Please do
   not post large code or responses like that here, it doesn’t work after ~10 lines
   or so.
 * If you need share that data please use [https://pastebin.com/](https://pastebin.com/)
   instead and post the link to that paste.
 *  Thread Starter [alanghenassia](https://wordpress.org/support/users/alanghenassia/)
 * (@alanghenassia)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/time_quantity-issue/#post-12337087)
 * There you go [https://pastebin.com/ERmQpdHK](https://pastebin.com/ERmQpdHK)
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/time_quantity-issue/#post-12337114)
 * [@alanghenassia](https://wordpress.org/support/users/alanghenassia/) I need to
   see the PHP code you’re using to generate the feed. The feed itself isn’t useful
   as it has been already built by your code and so I can’t see what’s going on.
 * Alternatively, did you know there’s a plugin to generate a RSS feed of popular
   posts?: [WordPress Popular Posts Feed](https://github.com/cabrerahector/wordpress-popular-posts-feed).
 *  Thread Starter [alanghenassia](https://wordpress.org/support/users/alanghenassia/)
 * (@alanghenassia)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/time_quantity-issue/#post-12337181)
 * We are not using any PHP code. We are using you plugin as it is. We are also 
   using the wordpress popular post feed.
 * Do you think we could jump on a private talk in order to share our feed to let
   you understand the issue ?
 * Thanks
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/time_quantity-issue/#post-12337198)
 * You mentioned that you’re using the `time_quantity` parameter. If you’re not 
   using PHP, then how exactly are you using it? Are you passing it as an URL parameter?
 *  Thread Starter [alanghenassia](https://wordpress.org/support/users/alanghenassia/)
 * (@alanghenassia)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/time_quantity-issue/#post-12337382)
 * Yes it is.
 *  Thread Starter [alanghenassia](https://wordpress.org/support/users/alanghenassia/)
 * (@alanghenassia)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/time_quantity-issue/#post-12337387)
 * We are using the URL `<webSiteUrl>/popular-posts/?range=custom&time_unit=hour&
   time_quantity=72`. We didn’t write any PHP code and we use what is called “REST
   API” in the plugin documentation.
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/time_quantity-issue/#post-12337467)
 * Ok, so the problem is the **WordPress Popular Posts Feed** plugin then. I’m not
   sure if you can use REST parameters with the WPP Feed plugin, it’s been a while
   since I last looked at its code and I honestly don’t remember. Maybe that’s the
   problem (you trying to use REST parameters with a RSS feed.) I’ll have a look
   into this as soon as I can.
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/time_quantity-issue/#post-12391462)
 * Hey [@alanghenassia](https://wordpress.org/support/users/alanghenassia/),
 * So I played around a bit with the WordPress Popular Posts Feed plugin and the
   RSS feed that the plugin generates doesn’t accept any parameters so I’m a little
   confused as to why you think it does take parameters. I tried your feed and it
   doesn’t seem to change despite passing it different variables either so you’re
   probably confused about how the WPP Feed plugin works.
 * Also, I rechecked the Pastebin code you shared before and the feed structure 
   is actually **different** from the one that the WordPress Popular Posts Feed 
   plugin outputs. The URL of the feed is different too: the WPP Feed plugin generates
   an URL like `https://www.example.com/feed/popular-posts/` while in your case 
   the feed is located at `https://passed.fr/popular-posts`.
 * All of these differences (the output being different, the URL of the feed being
   different) make me believe you/your developer customized the WPP Feed plugin 
   either via filter hooks or by changing code manually so it includes the image
   in the `description` node (among other changes.) Because of that, you’ll have
   to reach out to your developer and ask them to look into the image issue for 
   you since your site isn’t using the WPP Feed plugin the way I built it.
 * If there’s anything else I can do to help out please let me know.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Time_quantity issue’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/time_quantity-issue/#post-12391462)
 * Status: resolved