Random Posts from Category
[resolved] posts from more than one category (4 posts)

  1. Brin Wilson
    Posted 3 years ago #


    I'd like to specify more than one category from which to pull in random posts, is this possible?



  2. Stephanie Leary
    Plugin Author

    Posted 3 years ago #

    It's not something I want to introduce into the plugin, but you could certainly edit your copy to work that way. Are you familiar with WP_Query?

    Edit your file and change wp_dropdown_categories() on line 92 to a plain text input field where you can enter category IDs separated by commas. (Or, if you want to get fancy, write a loop that prints a checkbox for each category, then edit line 64 -- $instance['cat'] = $new_instance['cat']; to implode the resulting array into a comma-separated list.)

    And change its name so you don't get notified about automatic updates, which would overwrite your changes.

  3. Brin Wilson
    Posted 3 years ago #

    Thank you very much for your reply - I really appreciate it! One other thing, if you don't mind, rather than have the random posts appear in the sidebar, I'd like them to appear in the middle of a specific page, is there an easy way to achieve this? I'm created a new page template in TwentyEleven but I'm really not sure what to write to make the plugin appear... help?


  4. AviBadash
    Posted 3 years ago #

    I also need the sane thing like Brin:
    " I'd like them to appear in the middle of a specific page"
    There is any possibility to make a short code for this plug ?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Random Posts from Category
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic