• Resolved JohnNadeau

    (@johnnadeau)


    Hello,

    Currently, the Display WordPress Posts Widget only brings in the X most recent posts.

    Is there any way that I can tell it to:
    a) Randomly bring in posts?
    b) Select which Categories it pulls from?

    I’ve been experimenting with ShortCodesUltimate and it has those options, but it pulls from the internal website (not an external WordPress site like this widget).

    Thanks,

    John

    https://wordpress.org/plugins/jetpack/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic πŸš€

    Thats’s not possible at the moment, but that’s a good idea. We’ll consider adding an option to control the posts returned by the REST API in the next release.

    You can follow our progress here:
    https://github.com/Automattic/jetpack/pull/2209

    Since I submitted a patch, feel free to apply the patch to your version of Jetpack until it gets merged!

    Thread Starter JohnNadeau

    (@johnnadeau)

    Hi Jeremy,

    I might want to give your patch a try and think that I can implement it based upon your prior help/instructions and example in the link above.

    Do any of the Query Parameters ( at https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/posts ) allow it to randomly choose posts (rather than by Category, or Tags, etc.) ?

    Thanks,

    John

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic πŸš€

    Do any of the Query Parameters allow it to randomly choose posts

    I’m afraid not, but I’ll ask our developers if we could add a new random parameter. I’ll get back to you when I have some news!

    Thread Starter JohnNadeau

    (@johnnadeau)

    Hi Jeremy,

    The OrderBy/Random option in Recent Posts Extended widget has worked really well for internal blog posts, showing the reader a different set of posts each time they browse another page.

    It would be great if your Display WordPress Posts widget could do the same for external blog posts, rather than the same static posts.

    Has there been any further consideration of this idea/feature?

    Thanks,

    John

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic πŸš€

    Has there been any further consideration of this idea/feature?

    I’m afraid not. I’ll ask our API developers again, and see if we can make progress on this.

    Thread Starter JohnNadeau

    (@johnnadeau)

    Thank you!

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic πŸš€

    After some discussion, it doesn’t look like we’ll be able to add that option in the next few months.

    You could, however, use the following work-around:

    1. Install this plugin on the site you want to pull posts from:
      https://wordpress.org/plugins/rest-api/
    2. Install this plugin on the site where you’ll be displaying the posts:
      https://wordpress.org/plugins/rest-api-post-embeds/
    3. In your sidebar, add a new text widget, and follow the instructions here to create a shortcode that will display the posts you need. You’ll also want to include the order_by="rand" parameter. Here is an example of a shortcode you could build:
      [jeherve_post_embed url="jeremy.hu" order_by="rand" wpapi="true" number="5" image_size="202,114" include_credits="false" include_excerpt="false"]

    I hope this helps!

    Thread Starter JohnNadeau

    (@johnnadeau)

    Wow Jeremy… this is awesome… thanks !!!!

    I posted a quick follow up in your Rest-API-Post_Embeds Plugin support thread.

    John

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

The topic ‘Display WordPress Posts Widget – Order By Option’ is closed to new replies.