Jump to content
Sign in to follow this  
exploringkorea

Random Posts

Recommended Posts

exploringkorea

I would like to add random posts to my static homepage using a plugin. All of the plugins require you to add code to the template where you would like the random posts to appear. I have no idea where to add this? <?php random_posts(); ?> Where should I add the code? Do I add it on the page or have to edit css? Which file? I am using platform pro and my site link is www.exploringkorea.com

Share this post


Link to post
Share on other sites
Kate

Hi Steven, It depends where you want to add it. If you'd like to add it to a widget, you could use a PHP plugin like PHP Exec so that you can add that to the widget. If you'd like it to take the place of the current list of posts, then you would have to modify the template.postloop.php file.

Share this post


Link to post
Share on other sites
exploringkorea

Hi Kate, I'd like to add it to my home page which is a static page and add the randomposts to the content area? Do I still add this code to template.postloop.php file? Thanks

Share this post


Link to post
Share on other sites
exploringkorea

Thanks for all the replies but I still haven't figured it out yet. I really just need to know where to add the php code so that my plugin can display random posts on my static home page. There are a lot of files under apperance -> editor and not sure which file to add the code to. Thanks

Share this post


Link to post
Share on other sites
cmunns

Why can't you use a widget that is meant to go in the content area and not the sidebar?

Share this post


Link to post
Share on other sites
exploringkorea

I didn't know that could be done. I am still very new to this. Just incase anyone else has the same problems. I downloaded AmR shortcode any widget and added the widget to my shortcode bar and the added code to the page that I wanted the widget to appear on.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×