How can I edit the content in index.php? [duplicate]

If you are editing a theme or you are having a child theme, You can make your own custom template, give it a name Include header and footer in it using <?php /** * Template Name: Home Page * * Home page Layout */ get_header(); ?> <!– Do whateveer you want here –> get_footer(); ?> … Read more

Use of wp_insert_post and parameters

Check the docs at http://codex.wordpress.org/Function_Reference/wp_insert_post for the parameters to use with wp_insert_post This function inserts posts (and pages) in the database. It sanitizes variables, does some checks, fills in missing variables like date/time, etc. It takes an array as its argument and returns the post ID of the created post (or 0 if there is … Read more