Creation of page template
-
Hi,
On my front page I do not want to see any menues and created a page template called page-27.php where 27 is the page id for the front page.
In that file I have the following code:
<?php
/**
* Template Name: My Custom Home Page.
* Description: A Page Template with no header or main menu in Hem page.
*/// Code to display Page goes here…
.post-type-hem .page-header {
display: none;
}I am a rookie and it is my first time I have created a page template.
Under wp-content/themes I created a folder parent-child and under parent child I added style.css and functions.php. In functions.php I have the following code:
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/custom.css’ );
wp_enqueue_style( ‘child-style’,
get_stylesheet_directory_uri() . ‘/style.css’,
array(‘parent-style’)
);
}I have no idea what code I need to have in style.css under parent-child, I have added a style sheet header so far.
What code do I need to add in style.css under parent-child?
Is it something missing in functions.php?
I read under codex.www.ads-software.com that it was best to create a child theme so it won’t be overwritten when the parent theme gets updated
My question is how do I get this to work. When I activated the child theme the wp site got screwed up
- The topic ‘Creation of page template’ is closed to new replies.