create template for one page

Edit your “page-contactWohnsinn.php” file, And add this code to top of the file, <?php /** * Template Name: Contact Wohnsinn * * @package WordPress */ ?> and go to you page that you created in wp-admin, choose the template “Contact Wohnsinn” from right side options… and you are done..

Display pages from specific page template

Use get_post_field(‘post_content’, $product_page->ID ) to get the content outside loop. <?php $product_pages_args = array( ‘meta_key’ => ‘_wp_page_template’, ‘meta_value’ => ‘page_library_html.php’ ); $product_pages = get_pages( $product_pages_args ); ?> <?php foreach ( $product_pages as $product_page ) { echo ‘<div id=”posts” class=”flex_100″>’; echo ‘<div id=”library_title”><a href=”‘ . get_permalink( $product_page->ID ) . ‘”>’ . $product_page->post_title . ‘</a></div>’; echo ‘<div … Read more

Custom page Template and Script as a Plugin

This is covered in the Codex, under How to create a page template. In your theme you create a file called my-bacon-template.php and in that file you add the following to the top of the file, before any other code <?php /* Template Name: My Bacon Page */ After that you can put any content … Read more