How can I correctly redirect user to the submitted post and define a template for each new post in WordPress?

you need to get the ID from wp_insert_post and make sure you exit or die so: $pid = wp_insert_post($new_post); wp_redirect( get_permalink( $pid ); die(); As for the second part you can use the WordPress Template Hierarchy and simply name each one of your custom post type designs as single-{post_type}.php for example if your post type … Read more

Controlling the Admin panel for page templates

I would think that in the admin panel there would be fields for each area. I don’t get this part, could you elaborate?. Overall this sounds like a custom page templates to me. You can create templaets in advance, but assign them to pages via admin rather than hardcode slig/id match in template name.

Proper way to create custom static page

As has been mentioned, your way works, but there are some ways you can decouple the form from the template, allowing more flexibility. The Shortcode API allows you to create a shortcode for your form, so you can simply enter something like [my_form] in the page’s content, then within the function that handles your shortcode … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)