And why not using simple wordpress code, changing args ?
$args = array(
'post_type' => 'post',
'orderby' => 'rand',
'posts_per_page' => '1',
);
$my_query = new WP_Query( $args );
if ( $my_query->have_posts() ) {
while ( $my_query->have_posts() ) {
$my_query->the_post();
/* do your post output here */
} // end while
} // end if
Related Posts:
- Automatically Creating Posts for Popular Forum Topics or Products [closed]
- Summary and Comments on Main landing Page
- get post excerpt by query
- How Do I Use The WordPress Plugin Posts 2 Posts by Scribu?
- How to override normal WordPress search in Buddypress? [closed]
- How to Add jQuery Infinite Scroll to My Custom Archive Page
- publish_post hook isn’t working for scheduled posts
- Plugin for changing a post’s category based on it’s post date?
- How can I include PHP-Code to my post?
- Publish Post After Click On A Link
- Enable comments for post with comments meta box removed
- Edit/revise option for authors to suggest improvement to posts [closed]
- Is there an action that is called when a post is restored from the trash?
- plugin for wp_list_categories with posts
- Replace existing pages with new pages, keep menu links
- Adding “ ” before the last word in multiple defined areas with a plugin
- [Plugin: Posts 2 Posts] How does it work?
- How to add new tabs in post.php
- How to change ID of an attachment in wp_posts and its related tables correctly?
- New post notification plugin [closed]
- Adding Plugin-specific Fields with wp_insert_post()?
- Possible to add a language file to a plugin without adding .po/.mo files to plugin directory?
- What kind of data is that?
- How can i list random post from multiple category?
- Cron job not firing
- rt media plugin count not working in shortcode [closed]
- Is there an easy way to flag posts in the admin area?
- finding whether request is for post, and post id
- Can’t delete Draft Post [closed]
- Outbound link autometic converted into linkdirect , and not opening
- How to allow an editor to edit all WordPress blog posts but have the last say as administrator?
- Add An Activity Filter By User Id In Buddypress Plugin
- Buddypress – Add the post_id in the bp_activity_add function
- Contributive page where people logged in can write
- After plugin activation all users marked as Spam
- Trying to fix form resubmition with PRG (Getting error: Cannot modify header information – headers already sent by)
- Display wordpress post’s in popup?
- Unable to add TAB character to post?
- Implementing an image hosting website using WordPress? [closed]
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- Recent posts per category loop?
- ‘Organize Series Plugin’ as muti author feature
- Problem of encoding characters (apostrophes) in my posts publications
- How to backup single post in wordpress [closed]
- Is there a way to make the main page only display a brief description of the full article?
- How to change the post form from plugin?
- Allowing users to Sign-up > Login > Post articles that need approval
- posts from multiple post types in one slider
- How to display the featured post on the category page?
- Set Multiple Meta Values as an Array Using dispatch( ‘core/editor’ ).editPost() Call in Gutenberg/JS
- Is there a plugin or a way in the wordpress that would let us have different versions of a post or page accessibe to users?
- download button for audio file in post [closed]
- Print posts category or tag as a formatted journal
- wp_get_http has been deprecated. Use WP_Http instead
- Post deleted in trash [closed]
- How to relate 3 wordpress components with each other (Create database relationships)
- problem with register_activation_hook in plugin
- How to enable WPML in BuddyPress Multilingual Plugin in a single website? [closed]
- BuddyPress admin bar links are broken [closed]
- Using BuddyPress > ‘Register page’ [closed]
- How to get Recent Post From Each Category with Thumbnail?
- What snippet do I need to type to show my ACF field show up on my theme?
- Is there a way to make [Table Of Content] plugin while not using revision data?
- Why the internal link get converted into a comment?
- Is it possible to pin a post in second position from top
- page duplication on wordpress that wont stop
- Copy/paste local images not working in WordPress
- How to change my 3000 Published post status to Draft using PHPMyAdmin
- WP search box on page not finding .PDF files
- Changing the Default New User Notification Email
- How can I see $post object in frontend from functions.php?
- Allow members to create groups on my site
- load plugin in code snippet
- All Post WordPress Page Error
- Is it possible to create duplicate post on other site (either push, on publish, or pull, periodically)?
- How do I add languages?
- Add dynamic color to each category item
- Is there any hook to change media html in post? [duplicate]
- How to force regenerate thumbnails in WordPress posts?
- Publish Post but don’t call publish hook in foreground post creation
- Serialize $_POST global in wordpress
- How to use shortcode of any plugin to show it visually where i want?
- WordPress not updating post or disable plugin instead a white page appear
- Internationalization of Blog Posts
- Issues with Post 2 Post Plugin
- How to add character to content of post?
- how do you point ‘screen_function’ to a function in the same class? [closed]
- Custom feed parameters / Template overriding
- How can I save a setting field with multiple checkbox options generated by a foreach loop on a custom wordpress admin page?
- how to set approval of admin for wordpress posts submitted by the user?
- Plugin to display text before a post
- Shortcode returning specific content of a post
- How to get an error message if a form is empty (plugin: Post for site) [closed]
- How to customized post slider layout in elementor wordpress [closed]
- How to export post tags from wordpress
- Show WooCommerce products based on query parameters on redirect
- is_singular() in mu-plugins not working
- WP galleries in posts after import. How do I do it?
- Difficult case to solve – Select + select = result(related data)
- BBpress – No topics & reply post_type accessible for admin users