~1 min read

To load dummy content programatically load the content below into your functions.php.

This function runs on every page reload so be sure to run it only once and then remove it. Firstly setup the number of posts you need and then also specify the post type. After doing this proceed to your website front end  and reload the page.

After this your dummy posts should be added. Remove that code from your functions..php file and check your admin dashboard.

https://gist.github.com/dwainm/7bbc75639d247ee30d33

This is a modified version of Tom McFarlin’s post ( http://tommcfarlin.com/programmatically-create-a-post-in-wordpress/ )