Difference between revisions of "Wordpress Custom Themes"
(Created page with "== Intro == Basically some simple info about making and starting to create your own Wordpress template. == Basic Requirements == The files that you can use with a Wordpress T...") |
(No difference)
|
Revision as of 18:14, 17 January 2017
Intro
Basically some simple info about making and starting to create your own Wordpress template.
Basic Requirements
The files that you can use with a Wordpress Template that are integrated are listed here: https://codex.wordpress.org/Theme_Development
The ones that are absolutely required for wordpress admin panel to recognize it is below:
style.css index.php
This is a very basic one and if you feel like you need more functionality you can look through the link above.
Functions and Styles
Now there is definitely other ways to do these things but this is the way I managed.
Simple Header Image
Basically just adding a header image option for the top of each page. Lets you set the height and width was well where the default image gets set. This code would be within the functions.php file within your Theme folder.
function register_my_menu() {
register_nav_menu('header-menu',__( 'Header Menu' ));
}
add_action( 'init', 'register_my_menu' );
$args = array(
'width' => 960,
'height' => 198,
'default-image' => get_template_directory_uri() . '/images/header.jpg'
);
add_theme_support( 'custom-header', $args );