Decide if you want your articles to be pages or posts. Pages can have a hierarchical structure and it’s fairly simple to assign different page templates to various pages. Posts don’t do this. You could also create a custom post type if you have another need for posts and pages.
Whatever the post type, use wp_insert_post() to do the article insertions. In a similar vein, use wp_insert_category() to add category terms. To associate a particular term to a particular post, use wp_set_post_categories(). The other two functions need to be called before you can associate the two objects with this function.
You mentioned your articles have a link to a picture. This is probably the same as a “featured image” in WP. The functions for featured images still use the older name “thumbnail”, as in set_post_thumbnail(). Before you do that, the image needs to be associated with a “attachment” post type. Use wp_insert_attachment() for that.
The thumbnail moniker is misleading, which is why the label was changed to featured image. These “thumbnails” can be any size. These days they are often quite large. It would be an unusual theme to have actual thumbnail sized featured images.
Not all themes necessarily support featured images, though I think most do. If yours doesn’t, it’s not all that difficult to add support. Declare it with add_theme_support() and configure the templates to output the image with the_post_thumbnail() or similar.
]]>