Adding custom theme template to custom post type [duplicate]

File should be single-member_post.php instead of single-memberPost.php. In single-{posttype} , {post_type} is the $post_type argument of the register_post_type() function. Never use flush_rewrite_rules(); in init use it only on theme/plugin deactivate or activate. Since this is a theme you can use it on after_switch_theme hook. add_action( ‘init’, ‘my_cpt_init’ ); function register_cpt_member_post() { register_post_type( … ); } … Read more

html blog template to wordpress template

That is a much bigger topic than can be addressed here. Please take a look at the WordPress Codex entry on Theme Development Generally speaking, you break the HTML into a header, footer, and content area. The header goes into header.php, the footer goes into footer.php and the content area goes into index.php or another, … Read more

How does WP knows which template to use for a page

The native logic of template choice is contained in file aptly named template-loader.php. It processes the current context and calls respective get_*_template() functions, until a match is found. This process results in what is called Template Hierarchy. However as it was pointed out this only covers native core logic. Plugins can wildly customize this process … Read more