Pre requisite for theme customization in wordpress:

  • HTML
  • CSS
  • PHP (intro)

Fundamental Pages for wordpress theme

  • Header.php
  • Footer.php
  • index.php
  • sidebar.php
  • 404.php
  • search.php
  • style.css
  • single.php
  • post.php
  • archive.php
  • comments.php
  • functions.php

How to call any page into other page?

Let’s suppose , we want to add header into every page so we just need to add header calling function.

Like

get_Pagename();

get_sidebar();

get_footer();

get_header();

get_comments();

Remember we don’t add extension while calling a page.

CSS structure

  • Wrapper
    • container
      • nav
      • main
      • footer

Wrapper is our whole sheet of web page.

Container is the area of our web page.

Nav, Main and footer are inside the container.

Nav consists of header and navigation menus, while main is the content area like post etc… and footer is the bottom of our page.

Dynamic Sidebar

We shift our site into Word press due to it’s dynamically generate content and we don’t need to write any code , we can do all this work through drag and drop.

dynamic_sidebar(‘sidebar_name’);

e.g. dynamic_sidebar(‘right-sidebar’);

above function we used to call sidebar.

dynamic means we want to manage our sidebar dynamically while  underscore we used to separate two words.

The purpose of writing sidebar is very simple , we are just calling sidebar. Actually what we want , so we need sidebar that’s we wrote it.

Next is parameter, we defined the parameter in between the parenthesis, the name of sidebar, like in above example it’s “right-sidebar”.

You can find “dynamic_sidebar” function into wp-includes/widgets.php.

Bloginfo();

For Name of blog bloginfo(‘name’);

For Url of theme bloginfo(‘template_url’);

For url of Css bloginf0(‘stylesheet_url’);

Comments