Wednesday, April 5, 2017

WordPress Theme Development Basic

how to  add a theme on your WordPress?
Required  files are index.php and style.css

For upload theme you need to add some code on your css file
/*
Theme Name: you theme name
Theme URL: ranitsarker.blogspot.com
Author: Ranit
Author URL: ranitsarker.blogspot.com
Description: your theme descriptions
Version: 1.0
Tags: Music, Art, eCommerce, Membership, Video, Audio
Textdomain : firsttheme
*/

For image you need to create or collect a image size: 600*450 px and image name screenshot.png or .jpg

setting> general :


site title: bloginfo('title')
tag line: bloginfo('description')
wordpress address utl:  bloginfo('home')
site address: echo site_url()

some function:
থিম এর  লিংক টা show করায়।

1) echo get_template_directory_uri();

2) bloginfo('template_directory');

3) bloginfo('template_url');


hook: after_setup theme

add_theme_support for title-tag

How to add menu and show menu:

add menu:
register_nav_menus('menu-id', 'menu name');
show menu:
wp_nav_menu('theme_location ', 'menu-id');








4 comments: