Friday, August 12, 2011

Learning to Create a WordPress Theme

0 komentar
Good afternoon comrades all, meet again with me, tine AKA anggamovic who will discuss how to create a wordpress theme for all BinusHacker friend :)

PART 1

As I promised in yesterday's article http://www.binushacker.net/membuat-toggle-sederhana-css-dan-jquery.html , well now we continue the discussion about web design, the discussion which now will I lift the Making wordpress theme step by step ... This is PART 1 :)
Because the components of the bejibun wordpress theme, so here I will discuss one by one, why? apart so that you can better understand the hierarchy within your wordpress theme, you will also understand that using that tag tag by wordpress in the preparation of its front end.
We first prepare ingredients that we will use.
= [1] ​​= Template basic html
[Here I will use an HTML template that has a lot betebaran on google, to download please download here essentially http://freehtml5templates.com/downloads/free/butterflybrilliance.zip ]
= [2] = Text editor to edit the template basically, here I am using Dreamweaver 8, for which no please pake text editor eg notepad, notepad + +,
= [3] = Sweet tea, snacks, cigarettes to accompany reading this article, do not forget your favorite mp3 puter to mebuat mood ... you guys okay.
======== Step 1 [Pre Editing] =========
Before we start working on making this theme, it would be nice if we know the first hierarchy in the wordpress theme.
===> According wprainbow (wprainbow.com) written on the article
http://www.wprainbow.com/memahami-hirarki-theme-template-wordpress/
Called it,
WordPress Theme template has a flow of execution based on certain rules. This article will help you to understand the flow of the Theme Template
Prerequisites required
Before you continue reading this article, make sure you have read my previous article entitled Using Files Theme Template and WordPress Theme Know Your Anatomy.
Theme Templates Hierarchy
As we know in advance that a minimal WordPress Theme features 2 style.css and index.php file which is then when a WordPress Theme template files do not have the above, then the function will be replaced by other templates Theme based on a hierarchy of predetermined sequence by WordPress .
For example when visitors access the blog, then the engine will first look for WordPress Theme template file home.php. If WordPress is active now then it did not have a home.php file to be used is the index.php file. Another example when a visitor opens a particular Category is the first search engine WordPress is a file-id.php category, if not found then the category.php file was to be used, if still not found then the file archieve.php. Last if still not found then it will use the index.php file.
The following chart wordpress hierarchy:
======== Step 2 [Editing] =========
After you download the template html before it, now extract the folder,
as displayed in the chart above, we can conclude, the hierarchy of the most simple wordpress theme, following susuannya.
1. Style.css
2. index.php
3. footer.php
4. header.php
5. comments.php
6. single.php
7. page.php
8. archive.php
9. functions.php
That was the arrangement that we will use as the base,
Now we check the html theme that we had downloaded whether existing files that we need to do it or not? Which certainly has not, then our next task is to create a file that does not exist.
Existing file is style.css, then for other files that we created first, now create a file had the extension * php from notepad, create a file "text document" and save as index.php
After that we copy and paste the index.php file, create a 6 again, and rename it to the footer, header, single, page, comments, and archive functions.
Our next task, is to fill in header.php
Now open the index.html file that is included in temlpate html, open with notepad.
The following contents of index.html
<! Doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title> ButterflyBrilliance </ title>
<link rel="stylesheet" type="text/css" href="styles.css" media="screen" />
<link rel="stylesheet" type="text/css" href="print.css" media="print" />
<! - [If IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"> </ script> <! [Endif] ->
</ Head>
<body>
<div id="wrapper"> <! - # wrapper ->
<header> <! - header ->
<h1> <a href="#"> Butterfly Brilliance </ a> </ h1>
Your <h2> interesting tag line goes here </ h2>
</ Header> <! - End of header ->
<nav> <! - top nav ->
<div>
<ul>
<a href="#"> Home </ a> </ li>
<a href="#"> About </ a> </ li>
<a href="#"> Products </ a> </ li>
<a href="#"> Services </ a> </ li>
<a href="#"> Support </ a> </ li>
<a href="#"> Contact Us </ a> </ li>
</ Ul>
</ Div>
</ Nav> <! - End of top nav ->
<section id="main"> <! - # main content and sidebar area ->
<section id="content"> <! - # content ->
<article>
<h2> <a href="#"> First Article Title </ a> </ h2>
<p> <img src="images/orangebutterfly.png" alt="" /> Lorem ipsum dolor sit amet, consectetur adipiscing elite. Odio Integer nec. Praesent libero. Sed cursus dapibus ante silent. Sed nisi. nulla sem at Marquis nibh elementum imperdiet. Duis sagittis ipsum. Praesent Mauris. Fusce nec augue sed semper porta tellus. Mauris mass. Vestibule lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed Nunc lacinia dignissim. Fusce nec augue sed semper porta tellus. Mauris mass. Vestibule lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </ p>
</ Article>
<article>
<h2> <a href="#"> Second Article Title </ a> </ h2>
<p> <img src="images/coolbutterfly.png" alt="" /> Lorem ipsum dolor sit amet, consectetur adipiscing elite. Odio Integer nec. Praesent libero. Sed cursus dapibus ante silent. Sed nisi. nulla sem at Marquis nibh elementum imperdiet. Duis sagittis ipsum. Praesent Mauris. Fusce nec augue sed semper porta tellus. Mauris mass. Vestibule lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed Nunc lacinia dignissim. Duis sagittis ipsum. Praesent Mauris. Fusce nec augue sed semper porta tellus. Mauris mass. Vestibule lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </ p>
<p> Duis sagittis ipsum. Praesent Mauris. Fusce nec augue sed semper porta tellus. Mauris mass. Vestibule lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </ P>
</ Article>
</ Section> <! - End of # content ->
<aside id="sidebar"> <! - sidebar ->
<h3> Things To Do </ h3>
<ul>
<a href="#"> Play Games </ a> </ li>
<a href="#"> Chat With Friends </ a> </ li>
<a href="#"> Swap Stories </ a> </ li>
<a href="#"> Sell Stuff </ a> </ li>
<a href="#"> Buy Stuff </ a> </ li>
<a href="#"> Trade Stuff </ a> </ li>
</ Ul>
<h3> Sponsors </ h3>
<img src="images/ad125.jpg" alt="" /> <br /> <img src="images/ad125.jpg" alt="" /> <br /> <br />
<h3> Connect With Us </ h3>
<ul>
<a href="#"> Twitter </ a> </ li>
<a href="#"> Facebook </ a> </ li>
</ Ul>
</ Aside> <! - End of sidebar ->
</ Section> <! - End of # main content and sidebar->
<footer>
<section id="footer-area">
<section id="footer-outer-block">
<aside>
<h4> Friends </ h4>
<ul>
<a href="#"> one linkylink </ a> </ li>
<a href="#"> two linkylinks </ a> </ li>
<a href="#"> three linkylinks </ a> </ li>
</ Ul>
</ Aside> <! - End of # first segment footer ->
<aside>
<h4> Awesome Stuff </ h4>
<ul>
<a href="#"> one linkylink </ a> </ li>
<a href="#"> two linkylinks </ a> </ li>
<a href="#"> three linkylinks </ a> </ li>
</ Ul>
</ Aside> <! - End of # footer second segment ->
<aside>
<h4> coolness </ h4>
<ul>
<a href="#"> one linkylink </ a> </ li>
<a href="#"> two linkylinks </ a> </ li>
<a href="#"> three linkylinks </ a> </ li>
</ Ul>
</ Aside> <! - End of # third segment footer ->
<aside>
<h4> Blahdyblah </ h4>
<p> © 2010 <a href="#"> yoursite.com </ a> Praesent libero. Sed cursus dapibus ante silent. Sed nisi. </ P>
</ Aside> <! - End of # footer fourth segment ->
</ Section> <! - End of footer-outer-block ->
</ Section> <! - End of footer area ->
</ Footer>
</ Div> <! - # Wrapper ->
<! - Free template created by http://freehtml5templates.com ->
</ Body>
</ Html>
Having seen the content indexnya, we copy and paste into the header.php
The following source will we Copas.
<! Doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title> ButterflyBrilliance </ title>
<link rel="stylesheet" type="text/css" href="styles.css" media="screen" />
<link rel="stylesheet" type="text/css" href="print.css" media="print" />
<! - [If IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"> </ script> <! [Endif] ->
</ Head>
<body>
<div id="wrapper"> <! - # wrapper ->
<header> <! - header ->
<h1> <a href="#"> Butterfly Brilliance </ a> </ h1>
Your <h2> interesting tag line goes here </ h2>
</ Header> <! - End of header ->
<nav> <! - top nav ->
<div>
<ul>
<a href="#"> Home </ a> </ li>
<a href="#"> About </ a> </ li>
<a href="#"> Products </ a> </ li>
<a href="#"> Services </ a> </ li>
<a href="#"> Support </ a> </ li>
<a href="#"> Contact Us </ a> </ li>
</ Ul>
</ Div>
</ Nav> <! - End of top nav ->
<section id="main"> <! - # main content and sidebar area ->
It remains to edit an existing source that can run on our wordpress blog,
<link rel="stylesheet" type="text/css" href="styles.css" media="screen" />
As we are clay in the above tag, the tag will not be executed by wp engines, now we change the bit to run on our wp blog
Written there href = "styles.css" if the wordpress tag is used to memanggile style.css like this <? Php bloginfo ('stylesheet_url');?> therefore, we replace style.css posts tagged with the above.,, it will be like this
<Link rel = "stylesheet" href = "<? Php bloginfo ('stylesheet_url');?>" type = "text / css" media = "screen" />
There are also other *. css
<link rel="stylesheet" type="text/css" href="print.css" media="print" />
So we used to call him a second tag,
<? Php bloginfo ('template_url');? />
Add a tag in front print.css then the result like this
<Link rel = "stylesheet" type = "text / css" href = "<? Php bloginfo ('template_url');?>/ print.css" media = "print" />
Okay, then we insert the tag
<? Php wp_head ();?>
Before the </ head>
After that we SAVE.
The end result like this
<! Doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title> ButterflyBrilliance </ title>
<Link rel = "stylesheet" href = "<? Php bloginfo ('stylesheet_url');?>" type = "text / css" media = "screen" />
<Link rel = "stylesheet" type = "text / css" href = "<? Php bloginfo ('template_url');?>/ print.css" media = "print" /> <! ​​- [If IE]> < script src = "http://html5shiv.googlecode.com/svn/trunk/html5.js"> </ script> <! [endif] ->
</ Head>
<body>
<div id="wrapper"> <! - # wrapper ->
<header> <! - header ->
<h1> <a href="#"> Butterfly Brilliance </ a> </ h1>
Your <h2> interesting tag line goes here </ h2>
</ Header> <! - End of header ->
<nav> <! - top nav ->
<div>
<ul>
<a href="#"> Home </ a> </ li>
<a href="#"> About </ a> </ li>
<a href="#"> Products </ a> </ li>
<a href="#"> Services </ a> </ li>
<a href="#"> Support </ a> </ li>
<a href="#"> Contact Us </ a> </ li>
</ Ul>
</ Div>
</ Nav> <! - End of top nav ->
<section id="main"> <! - # main content and sidebar area ->
Before we go any further in the next step, bit I will discuss whatever the hell they will go into the header.php kedalah this?
Here we can insert a favicon.
Examples like this call faviconya
<Link rel = "shortcut icon" href = "<? Php bloginfo ('template_directory');?> / Favicon.ico" />
For now I encounter the ends meet up here first, already dusk, time for me to shower and prayer, so we proceed to the next meeting ..
Okay, have a niceday and GBU

PART 2

Okay friends, happy morning, this time we will discuss Learn to Make WordPress Theme Part 2.
We begin the morning with a smile, okay : D

Okay, before we continue the discussion yesterday, http://www.binushacker.net/belajar-membuat-theme-wordpress-p1.html , maybe one of you who read and listen to the tutor is asking questions, why it is different html tags from html usual we meet?
So this is my friend, the Internet world is growing, and even web developers to more easily develop source and simple, therefore, little by little I will get used in the design tutor that I give it using HTML5 + CSS3, because in the world webdis ( web design) source is being gandrungi : D
Okay, now we go to the next step ....
After yesterday we create the file header.php
Now we're going to make partner, the footer.php
Less we review ... tag index yesterday ...
<! Doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title> ButterflyBrilliance </ title>
<link rel="stylesheet" type="text/css" href="styles.css" media="screen" />
<link rel="stylesheet" type="text/css" href="print.css" media="print" />
<! - [If IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"> </ script> <! [Endif] ->
</ Head>
<body>
<div id="wrapper"> <! - # wrapper ->
<header> <! - header ->
<h1> <a href="#"> Butterfly Brilliance </ a> </ h1>
Your <h2> interesting tag line goes here </ h2>
</ Header> <! - End of header ->
<nav> <! - top nav ->
<div>
<ul>
<a href="#"> Home </ a> </ li>
<a href="#"> About </ a> </ li>
<a href="#"> Products </ a> </ li>
<a href="#"> Services </ a> </ li>
<a href="#"> Support </ a> </ li>
<a href="#"> Contact Us </ a> </ li>
</ Ul>
</ Div>
</ Nav> <! - End of top nav ->
<section id="main"> <! - # main content and sidebar area ->
<section id="content"> <! - # content ->
<article>
<h2> <a href="#"> First Article Title </ a> </ h2>
<p> <img src="images/orangebutterfly.png" alt="" /> Lorem ipsum dolor sit amet, consectetur adipiscing elite. Odio Integer nec. Praesent libero. Sed cursus dapibus ante silent. Sed nisi. Marquis nulla sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent Mauris. Fusce nec augue sed semper porta tellus. Mauris mass. Vestibule lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Nunc sed lacinia dignissim. Fusce nec augue sed semper porta tellus. Mauris mass. Vestibule lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </ P>
</ Article>
<article>
<h2> <a href="#"> Second Article Title </ a> </ h2>
<p> <img src="images/coolbutterfly.png" alt="" /> Lorem ipsum dolor sit amet, consectetur adipiscing elite. Odio Integer nec. Praesent libero. Sed cursus dapibus ante silent. Sed nisi. Marquis nulla sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent Mauris. Fusce nec augue sed semper porta tellus. Mauris mass. Vestibule lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Nunc sed lacinia dignissim. Duis sagittis ipsum. Praesent Mauris. Fusce nec augue sed semper porta tellus. Mauris mass. Vestibule lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </ P>
<p> Duis sagittis ipsum. Praesent Mauris. Fusce nec augue sed semper porta tellus. Mauris mass. Vestibule lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </ P>
</ Article>
</ Section> <! - End of # content ->
<aside id="sidebar"> <! - sidebar ->
<h3> Things To Do </ h3>
<ul>
<a href="#"> Play Games </ a> </ li>
<a href="#"> Chat With Friends </ a> </ li>
<a href="#"> Swap Stories </ a> </ li>
<a href="#"> Sell Stuff </ a> </ li>
<a href="#"> Buy Stuff </ a> </ li>
<a href="#"> Trade Stuff </ a> </ li>
</ Ul>
<h3> Sponsors </ h3>
<img src="images/ad125.jpg" alt="" /> <br /> <img src="images/ad125.jpg" alt="" /> <br /> <br />
<h3> Connect With Us </ h3>
<ul>
<a href="#"> Twitter </ a> </ li>
<a href="#"> Facebook </ a> </ li>
</ Ul>
</ Aside> <! - End of sidebar ->
</ Section> <! - End of # main content and sidebar->
<footer>
<section id="footer-area">
<section id="footer-outer-block">
<aside>
<h4> Friends </ h4>
<ul>
<a href="#"> one linkylink </ a> </ li>
<a href="#"> two linkylinks </ a> </ li>
<a href="#"> three linkylinks </ a> </ li>
</ Ul>
</ Aside> <! - End of # first segment footer ->
<aside>
<h4> Awesome Stuff </ h4>
<ul>
<a href="#"> one linkylink </ a> </ li>
<a href="#"> two linkylinks </ a> </ li>
<a href="#"> three linkylinks </ a> </ li>
</ Ul>
</ Aside> <! - End of # footer second segment ->
<aside>
<h4> coolness </ h4>
<ul>
<a href="#"> one linkylink </ a> </ li>
<a href="#"> two linkylinks </ a> </ li>
<a href="#"> three linkylinks </ a> </ li>
</ Ul>
</ Aside> <! - End of # third segment footer ->
<aside>
<h4> Blahdyblah </ h4>
<p> © 2010 <a href="#"> yoursite.com </ a> Praesent libero. Sed cursus dapibus ante silent. Sed nisi. </ P>
</ Aside> <! - End of # footer fourth segment ->
</ Section> <! - End of footer-outer-block ->
</ Section> <! - End of footer area ->
</ Footer>
</ Div> <! - # Wrapper ->
<! - Free template created by http://freehtml5templates.com ->
</ Body>
</ Html>
From the source above, we will take his part footer,
Here we go ... ... ..
</ Section> <! - End of # main content and sidebar->
<footer>
<section id="footer-area">
<section id="footer-outer-block">
<aside>
<h4> Friends </ h4>
<ul>
<a href="#"> one linkylink </ a> </ li>
<a href="#"> two linkylinks </ a> </ li>
<a href="#"> three linkylinks </ a> </ li>
</ Ul>
</ Aside> <! - End of # first segment footer ->
<aside>
<h4> Awesome Stuff </ h4>
<ul>
<a href="#"> one linkylink </ a> </ li>
<a href="#"> two linkylinks </ a> </ li>
<a href="#"> three linkylinks </ a> </ li>
</ Ul>
</ Aside> <! - End of # footer second segment ->
<aside>
<h4> coolness </ h4>
<ul>
<a href="#"> one linkylink </ a> </ li>
<a href="#"> two linkylinks </ a> </ li>
<a href="#"> three linkylinks </ a> </ li>
</ Ul>
</ Aside> <! - End of # third segment footer ->
<aside>
<h4> Blahdyblah </ h4>
<p> © 2010 <a href="#"> yoursite.com </ a> Praesent libero. Sed cursus dapibus ante silent. Sed nisi. </ P>
</ Aside> <! - End of # footer fourth segment ->
</ Section> <! - End of footer-outer-block ->
</ Section> <! - End of footer area ->
</ Footer>
</ Div> <! - # Wrapper ->
<! - Free template created by http://freehtml5templates.com ->
</ Body>
</ Html>
In this footer ga there was something strange, as a whole is almost the same as the header, so just place this code <? Php wp_footer ();?> Before </ body>,

The following functions according wp_footer
http://www.wpdesigner.com
The wp_footer () function is Often used by plugins to insert PHP codes after everything else on your page. According to WordPress.org theme development documentation, Should you place the wp_footer () function in the footer, the which would be in the footer.php file.
One detail WordPress.org That does not mention Is that most plugins (ie: Spam Karma 2, PodPress, and FireStats), using the wp_footer () function, growing niche to break your theme. A well-designed and well-built theme is nothing without a Safely placed wp_footer () function.
Here's my advice. Do not place the wp_footer () function right before the end; that's usually the closing body tag. Instead, place That function within a DIV or container. For example:
Posts
Sidebar
If you do that, no matter what a Certain plugin does to the footer of your theme, it does not expand beyond the container or the DIV containing the wp_footer () function. You can open up the footer.php file of the Greed theme for an example.
Update:
Place the wp_footer () function within a style-less container (usually the outermost div with no backgrounds and images) That does not depend on your layout. Otherwise, you Might end up with an incomplete layouts while waiting for a slow loading plugins.
So literally a function of wp_footer is as a benchmark the use of plug-ins if you want to plug-ins such as it was running where it should.
So there is the final source to footer.php lahah like this.
</ Section> <! - End of # main content and sidebar->
<footer>
<section id="footer-area">
<section id="footer-outer-block">
<aside>
<h4> Friends </ h4>
<ul>
<a href="#"> one linkylink </ a> </ li>
<a href="#"> two linkylinks </ a> </ li>
<a href="#"> three linkylinks </ a> </ li>
</ Ul>
</ Aside> <! - End of # first segment footer ->
<aside>
<h4> Awesome Stuff </ h4>
<ul>
<a href="#"> one linkylink </ a> </ li>
<a href="#"> two linkylinks </ a> </ li>
<a href="#"> three linkylinks </ a> </ li>
</ Ul>
</ Aside> <! - End of # footer second segment ->
<aside>
<h4> coolness </ h4>
<ul>
<a href="#"> one linkylink </ a> </ li>
<a href="#"> two linkylinks </ a> </ li>
<a href="#"> three linkylinks </ a> </ li>
</ Ul>
</ Aside> <! - End of # third segment footer ->
<aside>
<h4> Blahdyblah </ h4>
<p> © 2010 <a href="#"> yoursite.com </ a> Praesent libero. Sed cursus dapibus ante silent. Sed nisi. </ P>
</ Aside> <! - End of # footer fourth segment ->
</ Section> <! - End of footer-outer-block ->
</ Section> <! - End of footer area ->
</ Footer>
<? Php wp_footer ();?>
</ Div> <! - # Wrapper ->
<! - Free template created by http://freehtml5templates.com ->

</ Body>
</ Html>
Leason our so thats all for today, hope you understand.
And than have a great day and GBU
See ya in next step ....
PS: To discuss please go to: http://forum.binushacker.net :)

PART 3

Night, staying up all ya, from there work on mending ga lanjutin material that we previously discussed that make me footer.php
Direct aja dah,

The next step is to make the stuffing from index.php
Previously we first review the contents of header.php and footer.php
header.php
<! Doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title> ButterflyBrilliance </ title>
<Link rel = "stylesheet" href = "<? Php bloginfo ('stylesheet_url');?>" type = "text / css" media = "screen" />
<Link rel = "stylesheet" type = "text / css" href = "<? Php bloginfo ('template_url');?>/ print.css" media = "print" /> <! ​​- [If IE]> < script src = "http://html5shiv.googlecode.com/svn/trunk/html5.js"> </ script> <! [endif] ->
</ Head>
<body>
<div id="wrapper"> <! - # wrapper ->
<header> <! - header ->
<h1> <a href="#"> Butterfly Brilliance </ a> </ h1>
Your <h2> interesting tag line goes here </ h2>
</ Header> <! - End of header ->
<nav> <! - top nav ->
<div>
<ul>
<a href="#"> Home </ a> </ li>
<a href="#"> About </ a> </ li>
<a href="#"> Products </ a> </ li>
<a href="#"> Services </ a> </ li>
<a href="#"> Support </ a> </ li>
<a href="#"> Contact Us </ a> </ li>
</ Ul>
</ Div>
</ Nav> <! - End of top nav ->
<section id="main"> <! - # main content and sidebar area ->
footer.php
</ Section> <! - End of # main content and sidebar->
<footer>
<section id="footer-area">
<section id="footer-outer-block">
<aside>
<h4> Friends </ h4>
<ul>
<a href="#"> one linkylink </ a> </ li>
<a href="#"> two linkylinks </ a> </ li>
<a href="#"> three linkylinks </ a> </ li>
</ Ul>
</ Aside> <! - End of # first segment footer ->
<aside>
<h4> Awesome Stuff </ h4>
<ul>
<a href="#"> one linkylink </ a> </ li>
<a href="#"> two linkylinks </ a> </ li>
<a href="#"> three linkylinks </ a> </ li>
</ Ul>
</ Aside> <! - End of # footer second segment ->
<aside>
<h4> coolness </ h4>
<ul>
<a href="#"> one linkylink </ a> </ li>
<a href="#"> two linkylinks </ a> </ li>
<a href="#"> three linkylinks </ a> </ li>
</ Ul>
</ Aside> <! - End of # third segment footer ->
<aside>
<h4> Blahdyblah </ h4>
<p> © 2010 <a href="#"> yoursite.com </ a> Praesent libero. Sed cursus dapibus ante silent. Sed nisi. </ P>
</ Aside> <! - End of # footer fourth segment ->
</ Section> <! - End of footer-outer-block ->
</ Section> <! - End of footer area ->
</ Footer>
<? Php wp_footer ();?>
</ Div> <! - # Wrapper ->
<! - Free template created by http://freehtml5templates.com ->
</ Body>
</ Html>
Okay we now make its index, open the index.php file its
And input 2 of this code:
<? Php get_header ()?>
<? Php get_footer ();?>
Now open the index.html file of the theme that yesterday we download and copy and paste this code between the code above, and the results are like this.
<? Php get_header ()?>
<section id="content"> <! - # content ->
<article>
<h2> <a href="#"> First Article Title </ a> </ h2>
<p> <img src="images/orangebutterfly.png" alt="" /> Lorem ipsum dolor sit amet, consectetur adipiscing elite. Odio Integer nec. Praesent libero. Sed cursus dapibus ante silent. Sed nisi. Marquis nulla sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent Mauris. Fusce nec augue sed semper porta tellus. Mauris masses. Vestibule lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per-conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Nunc sed lacinia dignissim. Fusce nec augue sed semper porta tellus. Mauris mass. Vestibule lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </ P>
</ Article>
<article>
<h2> <a href="#"> Second Article Title </ a> </ h2>
<p> <img src="images/coolbutterfly.png" alt="" /> Lorem ipsum dolor sit amet, consectetur adipiscing elite. Odio Integer nec. Praesent libero. Sed cursus dapibus ante silent. Sed nisi. Marquis nulla sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent Mauris. Fusce nec augue sed semper porta tellus. Mauris mass. Vestibule lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Nunc sed lacinia dignissim. Duis sagittis ipsum. Praesent Mauris. Fusce nec augue sed semper porta tellus. Mauris mass. Vestibule lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </ P>
<p> Duis sagittis ipsum. Praesent Mauris. Fusce nec augue sed semper porta tellus. Mauris mass . Vestibule lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </ P>
</ Article>
</ Section> <! - End of # content ->
<aside id="sidebar"> <! - sidebar ->
<h3> Things To Do </ h3>
<ul>
<a href="#"> Play Games </ a> </ li>
<a href="#"> Chat With Friends </ a> </ li>
<a href="#"> Swap Stories </ a> </ li>
<a href="#"> Sell Stuff </ a> </ li>
<a href="#"> Buy Stuff </ a> </ li>
<a href="#"> Trade Stuff </ a> </ li>
</ Ul>
<h3> Sponsors </ h3>
<img src="images/ad125.jpg" alt="" /> <br /> <img src="images/ad125.jpg" alt="" /> <br /> <br />
<h3> Connect With Us </ h3>
<ul>
<a href="#"> Twitter </ a> </ li>
<a href="#"> Facebook </ a> </ li>
</ Ul>
</ Aside> <! - End of sidebar ->
<? Php get_footer ();?>
Up here in fact this template is ready at the test (but not yet feasible)
Our next task is to display the results of our posts.
As written the code index above, there are two tags article, we throw away one,
The result is like this:
<? Php get_header ()?>
<section id="content"> <! - # content ->
<article>
<h2> <a href="#"> First Article Title </ a> </ h2>
<p> <img src="images/orangebutterfly.png" alt="" /> Lorem ipsum dolor sit amet, consectetur adipiscing elite. Odio Integer nec. Praesent libero. Sed cursus dapibus ante silent. Sed nisi. Marquis nulla sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent Mauris. Fusce nec augue sed semper porta tellus. Mauris mass. Vestibule lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Nunc sed lacinia dignissim. Fusce nec augue sed semper porta tellus. Mauris mass. Vestibule lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </ P>
</ Article>
</ Section> <! - End of # content ->
<aside id="sidebar"> <! - sidebar ->
<h3> Things To Do </ h3>
<ul>
<a href="#"> Play Games </ a> </ li>
<a href="#"> Chat With Friends </ a> </ li>
<a href="#"> Swap Stories </ a> </ li>
<a href="#"> Sell Stuff </ a> </ li>
<a href="#"> Buy Stuff </ a> </ li>
<a href="#"> Trade Stuff </ a> </ li>
</ Ul>
<h3> Sponsors </ h3>
<img src="images/ad125.jpg" alt="" /> <br /> <img src="images/ad125.jpg" alt="" /> <br /> <br />
<h3> Connect With Us </ h3>
<ul>
<a href="#"> Twitter </ a> </ li>
<a href="#"> Facebook </ a> </ li>
</ Ul>
</ Aside> <! - End of sidebar ->
<? Php get_footer ();?>
Now we will pair our posts herbal caller,
Here we go ... ..
<? Php if (have_posts ()): while (have_posts ()): the_post ();?>
<? Php endwhile;?>
<? Php endif;?>
We attach the tag our article, the final code is right here.
<? Php if (have_posts ()): while (have_posts ()): the_post ();?>
<article>
<h2> <a href = "<? php the_permalink ()?>"> <? php the_title ();?> </ a> </ h2>
<p> <img src = "<? php bloginfo ('template_directory');?> / images / orangebutterfly.png" alt = "" />
<? Php the_content ('Read more »');?> </ P>
</ Article>
<? Php endwhile;?>
<? Php endif;?>
So the results of our work tonight generating source index.php like this:
<? Php get_header ()?>
<section id="content"> <! - # content ->
<? Php if (have_posts ()): while (have_posts ()): the_post ();?>
<article>
<h2> <a href = "<? php the_permalink ()?>"> <? php the_title ();?> </ a> </ h2>
<p> <img src = "<? php bloginfo ('template_directory');?> / images / orangebutterfly.png" alt = "" />
<? Php the_content ('Read more »');?> </ P>
</ Article>
<? Php endwhile;?>
<? Php endif;?>
</ Section> <! - End of # content ->
<aside id="sidebar"> <! - sidebar ->
<h3> Things To Do </ h3>
<ul>
<a href="#"> Play Games </ a> </ li>
<a href="#"> Chat With Friends </ a> </ li>
<a href="#"> Swap Stories </ a> </ li>
<a href="#"> Sell Stuff </ a> </ li>
<a href="#"> Buy Stuff </ a> </ li>
<a href="#"> Trade Stuff </ a> </ li>
</ Ul>
<h3> Sponsors </ h3>
<img src="images/ad125.jpg" alt="" /> <br /> <img src="images/ad125.jpg" alt="" /> <br /> <br />
<h3> Connect With Us </ h3>
<ul>
<a href="#"> Twitter </ a> </ li>
<a href="#"> Facebook </ a> </ li>
</ Ul>
</ Aside> <! - End of sidebar ->
<? Php get_footer ();?>
For now at both ends meet first, we'll continue later in the stage of making single.php
So keep stay in www.BinusHacker.net for more useable article.
Good nite and have a great dream to night.
See ya :)

PART 4

New Well sempet post again .. some days it's a bit busy ma arrears task must be finished that already come loaded for UAS, plus the hassle beresin Porum community, her tutor so neglected dah ....

Because the debt must be paid, so ane dah lanjutin again his tutor ...
Mungkin dari kalian semua ada yang berpendapat kenapa tutor nya ga disatuin aja, kenapa musti dibagi bagi gini??
gini gan, dulu ane pernah singgah disalah satu blog tutor, disana menerapkan one week one content.dan itu ternyata berhasil, karena kita akan lebih fokus dalam satu ulasan itu, tanpa terpengaruh oleh yang lain, nah konsep seperti itu mulai ane terapin dihampir semua site garapan ane,ane harap sih, kalian semua bisa menerima cara penyampaian yang ane jalankan, sukur sukur agan semua kaga puas dengan apa yang udah ane sampein, jadi bisa bertanya dan lebih ngulik lagi soal bahasanya, tambah banyak kan tambah ilmu. right?
Lanjut setelah kemaren kita buat index.php..
http://www.binushacker.net/belajar-membuat-theme-wordpress-p3.html
Enaknya kita ngelancong kemana dulu ya??
Yang pendek pendek dulu aja kalia ya.. oke deh,, h a ri ini kita akan bahas sidebar.php
Sebelum nya review dulu isian dari idex.php
index.php
<?php get_header()?>
<section id=”content”><!– #content –>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article>
<h2><a href=”<?php the_permalink() ?>” ><?php the_title(); ?></a></h2>
<p><img src=”<?php bloginfo('template_directory'); ?>/images/orangebutterfly.png” alt=”” />
<?php the_content('Read more &raquo;'); ?></p>
</article>
<?php endwhile; ?>
<?php endif; ?>
</section><!– end of #content –>
<aside id=”sidebar”><!– sidebar –>
<h3>Things To Do</h3>
<ul>
<li><a href=”#”>Play Games</a></li>
<li><a href=”#”>Chat With Friends</a></li>
<li><a href=”#”>Swap Stories</a></li>
<li><a href=”#”>Sell Stuff</a></li>
<li><a href=”#”>Buy Stuff</a></li>
<li><a href=”#”>Trade Stuff</a></li>
</ Ul>
<h3>Sponsors</h3>
<img src=”images/ad125.jpg” alt=”” /><br /><img src=”images/ad125.jpg” alt=”” /><br /><br />
<h3>Connect With Us</h3>
<ul>
<li><a href=”#”>Twitter</a></li>
<li><a href=”#”>Facebook</a></li>
</ Ul>
</aside><!– end of sidebar –>
<?php get_footer();?>
Dalam html5, sudah disediakan t a g sidebar, yaitu “aside” jadi kita buka file sidebar.php
dan index.php nya,
Cut code ini dari index.php
<aside id=”sidebar”><!– sidebar –>
<h3>Things To Do</h3>
<ul>
<li><a href=”#”>Play Games</a></li>
<li><a href=”#”>Chat With Friends</a></li>
<li><a href=”#”>Swap Stories</a></li>
<li><a href=”#”>Sell Stuff</a></li>
<li><a href=”#”>Buy Stuff</a></li>
<li><a href=”#”>Trade Stuff</a></li>
</ Ul>
<h3>Sponsors</h3>
<img src=”images/ad125.jpg” alt=”” /><br /><img src=”images/ad125.jpg” alt=”” /><br /><br />
<h3>Connect With Us</h3>
<ul>
<li><a href=”#”>Twitter</a></li>
<li><a href=”#”>Facebook</a></li>
</ Ul>
</aside><!– end of sidebar –>
Dan paste-kan di sidebar.php
Sekarang buka lagi file index.php nya, kita akan masukan tak pemanggil sidebar.
Here we go….
<?php get_sidebar(); ?>
Nah, sekarang pasang fungsi itu di index.php
Jadinya seperti ini….
<?php get_header()?>
<section id=”content”><!– #content –>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article>
<h2><a href=”<?php the_permalink() ?>” ><?php the_title(); ?></a></h2>
<p><img src=”<?php bloginfo('template_directory'); ?>/images/orangebutterfly.png” alt=”” />
<?php the_content('Read more &raquo;'); ?></p>
</article>
<?php endwhile; ?>
<?php endif; ?>
</section><!– end of #content –>
<?php get_sidebar(); ?><?php get_footer();?>
Setelah itu save file index.phpnya, sekarang buka file sidebar.php
Nah berikut fungsi yang biasa diisikan di file sidebar.php
  1. <?php wp_list_pages('title_li=<h2>Pages</h2>'); ?>
  2. <?php wp_list_cats(); ?>
  3. <?php wp_get_archives('type=monthly'); ?>
  4. <?php related_posts(10, 10, '<li>', '</li>', ”, ”, false, false); ?>
Fungsi diatas masih bisa agan semua modifikasi lagi,silakan lihat http://codex.wordpress.org/Customizing_Your_Sidebar jika ingin mengetahui lebih dalam tentang costumasi sidebar. untuk sekarang saya hanya akan menggunakan sebagian saja biar tidak riweuh… wkwkwk : D
Ini hasil akhir untuk file sidebar.php
<aside id=”sidebar”><!– sidebar –>
<h3>
<?php _e('Categories:'); ?>
</h3>
<ul>
<?php wp_list_categories(' title_li= '); ?>
</ Ul>
<h3>
<?php _e('Pages:'); ?>
</h3>
<ul>
<?php wp_list_pages('title_li='); ?>
</ Ul>
<h3>
<?php _e('Archiev:'); ?>
</h3>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ Ul>
</aside><!– end of sidebar –>
Save and done…
Oke cukup dulu ah.. . .
Mau lanjut lagi ngerjain makalah. so keep stay @ binushacker.net
and see ya.
GBU

PART 5

Yang langsung nyantol di link ini, nih ane kasih part part sebelum mulai beranjak untuk membaca part 5 ini. silakan di pelajari dan di komentari : D

Kemaren kita udah buat file sidebar.php , dan berhubung sekarang waktu ane sangat sangat singkat banget, jadi kita mulai dengan hal file yang simple dulu kali ye…
Oke yang sekarang akan kita bahas adalah membuat file comments.php
Berhubung ane sendiri sampe sekarang masih agak bingung tentang costumasi file comments.php jadi ane kasih mentahnya aja untuk kalian copas di file comments.php yang sebelumnya telah kita buat.
Silakan pastekan function ini di comments.php
<?php // Do not delete these lines
if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
if (!empty($post->post_password)) { // if there's a password
if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie
?>
<p>This post is password protected. Enter the password to view comments.</p>
<? Php
return;
}
}
/* This variable is for alternating comment background */
$oddcomment = ”;
?>
<!– You can start editing here. –>
<?php if ($comments) : ?>
<h2 id=”comments”>Comments</h2>
<div>
<?php wp_list_comments2(); ?>
</ Div>
<?php else : // this is displayed if there are no comments so far ?>
<?php if ('open' == $post->comment_status) : ?>
<!– If comments are open, but there are no comments. –>
<?php else : // comments are closed ?>
<!– If comments are closed. –>
<p>Comments are closed.</p>
<?php endif; ?>
<?php endif; ?>
<?php if ('open' == $post->comment_status) : ?>
<div id=”respond”>
<h3 id=”respond_title”>Post a comment</h3>
<div>
<small><?php cancel_comment_reply_link(); ?></small>
</ Div>
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>You must be <a href=”<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>”>logged in</a> to post a comment.</p>
<?php else : ?>
<form action=”<?php echo get_option('siteurl'); ?>/wp-comments-post.php” method=”post” id=”commentform”>
<div>
<?php theme_google_300_ads_show(); ?>
</ Div>
<?php if ( $user_ID ) : ?>
<p>Logged in as <a href=”<?php echo get_option('siteurl'); ?>/wp-admin/profile.php”><?php echo $user_identity; ?></a>. <a href=”<?php echo wp_logout_url(get_permalink()); ?>” title=”Log out of this account”>Log out &raquo;</a></p>
<?php else : ?>
<p><input type=”text” name=”author” id=”author” value=”<?php echo $comment_author; ?>” size=”22″ tabindex=”1″ <?php if ($req) echo “aria-required='true'”; ?> />
<label for=”author”><small>Name <?php if ($req) echo “(required)”; ?></small></label></p>
<p><input type=”text” name=”email” id=”email” value=”<?php echo $comment_author_email; ?>” size=”22″ tabindex=”2″ <?php if ($req) echo “aria-required='true'”; ?> />
<label for=”email”><small>Mail (will not be published) <?php if ($req) echo “(required)”; ?></small></label></p>
<p><input type=”text” name=”url” id=”url” value=”<?php echo $comment_author_url; ?>” size=”22″ tabindex=”3″ />
<label for=”url”><small>Website</small></label></p>
<?php endif; ?>
<!–<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>–>
<p><textarea name=”comment” id=”comment” cols=”100%” rows=”10″ tabindex=”4″></textarea></p>
<p><input name=”submit” type=”image” src=”<?php bloginfo('template_url')?>/images/comm_sub.gif” id=”submit” tabindex=”5″ value=”Submit Comment” />
<?php comment_id_fields(); ?>
</ P>
<?php do_action('comment_form', $post->ID); ?>
</form>
<?php endif; // If registration required and not logged in ?>
</ Div>
<?php endif; // if you delete this the sky will fall on your head ?>
Dari pengalaman ane selama ini mengostumasi file comments.php , ane hanya mengetahui beberapa dari ratusan bahkan ribuat trik untuk membuat menarik comments kalian…
Kalian bisa mempercantik tag tag html nya dengan mengcostumasinya di style.css
So thats it for today.
Semoga kalian tidak puas dan terus bertanya.
Stay connect with us @ http://www.binushacker.net
And forum @ http://forum.binushacker.net
See ya and have a nice day…… :)

PART 6

Yo yo yo. selamat malam kawan semuanya…. mari kita lanjutkan pembelajaran kita pada pembahasan pembuatan tema wordpress.
Ga kerasa sekarang itu udah memasuki tuto yang part 6,
Yang sekarang akan kita bahas adalah cara membuat file single.php , oh iye, tutor ini ane dah susun mulai dari depan hingga belakang secara berurutan, seperti pada part 1 kita membahas membuat header, dan footer pada part 2, dilanjutkan dengan index pada part 3, disusul oleh sidebar pada part 4, dan comments pada part 5, jadi menurut hemat saya, maka selanjutnya adalah single, so lets start….
pada dasarnya, single.php itu sama dengan index.php hanya saja ada beberapa tambahan pada page single. seperti komentar, similiar post, etc.
Jadi untuk membuat single.php kita buka dulu file index.php
Dan copas isinya ke single.php ….

Berikut adalah isi dari index.php renewal yang udah di refisi pada part 4,
<?php get_header()?>
<section id=”content”><!– #content –>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article>
<h2><a href=”<?php the_permalink() ?>” ><?php the_title(); ?></a></h2>
<p><img src=”<?php bloginfo('template_directory'); ?>/images/orangebutterfly.png” alt=”” />
<?php the_content('Read more &raquo;'); ?></p>
</article>
<?php endwhile; ?>
<?php endif; ?>
</section><!– end of #content –>
<?php get_sidebar(); ?><?php get_footer();?>
Nah sekarang tambah kan code pemanggil comment
Berikut code nya…
<?php comments_template(); ?>
Letakan sebelum endwhile, maka hasil akhirnya seperti ini…
<?php get_header()?>
<section id=”content”><!– #content –>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article>
<h2><a href=”<?php the_permalink() ?>” ><?php the_title(); ?></a></h2>
<p><img src=”<?php bloginfo('template_directory'); ?>/images/orangebutterfly.png” alt=”” />
<?php the_content('Read more &raquo;'); ?></p>
</article>
<?php comments_template(); ?>
<?php endwhile; ?>
<?php endif; ?>
</section><!– end of #content –>
<?php get_sidebar(); ?><?php get_footer();?>
Save code diatas dengan nama single.php ,
Mudah kan.. oke sekarang mah belajarnye pendek pendek aje dulu ye.. cz takut muntah klo di jejelin bejibun code dalam sekali lahap, Pelan pelan aje ye, supaya tar kalian pada bisa dan berkarya dengan ilmu,,
So thats it for today..
I'll teach you all in next meeting..
Have a great day, and see ya…
NB : keep learning and join us @ forum.binushacke.net

PART 7

Selamat malam semuanye… pa kabar nih?? bertemu lagi dengan angga aka anggamovic, setelah kemaren kita buat file single.php sekarang kita akan membahas page.php

Sebenernye sama aja dengan single.php cuma page.php ini akan didipake sebagai default page yang kita buat.
Sekarang kita buka lagi file single.php nya.. dan copy semua source yang ada, copas ke file page.php
Maka file page.php akan menjadi seperti ini
<?php get_header()?>
<section id=”content”><!– #content –>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article>
<h2><a href=”<?php the_permalink() ?>” ><?php the_title(); ?></a></h2>
<p><img src=”<?php bloginfo('template_directory'); ?>/images/orangebutterfly.png” alt=”” />
<?php the_content('Read more &raquo;'); ?></p>
</article>
<?php comments_template(); ?>
<?php endwhile; ?>
<?php endif; ?>
</section><!– end of #content –>
<?php get_sidebar(); ?><?php get_footer();?>
Ada satu lagi trik di file page.php ini. ane nemu trik ini setelah beberapa waktu lalu ane mau buat page galery di blog ane, tapi rasanya canggung klo pake template page bawaan tema. makanya ane cari sumber lain dan ga jauh jauh.. ketemunye di instalan wordpress juga, tepatnye di tema bawaan wordpress.. nah hal yang perlu kalian tambahkan untuk membuat page yang kalian ingin kan dan pastinya beda dari page.php yang ada. silakan kalian modifikasi sebagus mungkin file page.php nya. setelah itu save as, ubah namanya terserah kalian, disini saya kasih contoh galery.php nah setelah itu kalian tambah kan code ini tepat di atas
<?php get_header();?>
Berikut codenya
<?php /*
Template Name: Galery
*/ ?>
Nah jadinya seperti ini
<?php /*
Template Name: Galery
*/ ?>
<?php get_header()?>
<section id=”content”><!– #content –>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article>
<h2><a href=”<?php the_permalink() ?>” ><?php the_title(); ?></a></h2>
<p><img src=”<?php bloginfo('template_directory'); ?>/images/orangebutterfly.png” alt=”” />
<?php the_content('Read more &raquo;'); ?></p>
</article>
<?php comments_template(); ?>
<?php endwhile; ?>
<?php endif; ?>
</section><!– end of #content –>
<?php get_sidebar(); ?><?php get_footer();?>
Oke untuk kostumasinya saya akan tampilkan jika tutorial ini sudah selesai dan tema hasil buatan kita ..
So have a nice day and nice day
Dont Forget To Join Forum BinusHacker :)
http://forum.binushacker.net

PART 8

Seperti yang sudah ane janjiin dulu di pagenya B|H di facebook bahwa ane akan bahas tentang functions.php di wordpress, nah pertemuan sekarang ane akan sedikit mengulas tentang functions.php , pada dasarnya functions.php adalah file yang berisi perintah tambahan untuk blog kita. dan disini kita bisa melakukan segala hal untuk blog kita. bisa dibilang ini adalah nyawa ketiga blog kita setelah hosting dan theme….

So lets begin
Completely remove the version number from pages and feeds
// remove version info from head and feeds
function complete_version_removal() {
return ”;
}
add_filter('the_generator', 'complete_version_removal');
Customize the admin footer message
// customize admin footer text
function custom_admin_footer() {
echo 'Website Design by Monzilla Media';
}
add_filter('admin_footer_text', 'custom_admin_footer');
Enable delete and spam links for comments
// spam & delete links for all versions of wordpress
function delete_comment_link($id) {
if (current_user_can('edit_post')) {
echo '| del ';
echo '| spam';
}
}
dan tambah kan ini di cooments loop nya
Disable all WordPress feeds
// disable all feeds
function fb_disable_feed() {
wp_die(__('

Feed not available, please visit our Home Page!

'));
}
add_action('do_feed', 'fb_disable_feed', 1);
add_action('do_feed_rdf', 'fb_disable_feed', 1);
add_action('do_feed_rss', 'fb_disable_feed', 1);
add_action('do_feed_rss2′, 'fb_disable_feed', 1);
add_action('do_feed_atom', 'fb_disable_feed', 1);
Add feed links to header
// add feed links to header
if (function_exists('automatic_feed_links')) {
automatic_feed_links();
} Else {
return;
}
Enable threaded comments
// enable threaded comments
function enable_threaded_comments(){
if (!is_admin()) {
if (is_singular() AND comments_open() AND (get_option('thread_comments') == 1))
wp_enqueue_script('comment-reply');
}
}
add_action('get_header', 'enable_threaded_comments');
Remove unwanted crap from the head section
// remove junk from head
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'feed_links', 2);
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'feed_links_extra', 3);
remove_action('wp_head', 'start_post_rel_link', 10, 0);
remove_action('wp_head', 'parent_post_rel_link', 10, 0);
remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);
Add a different favicon for your blog's Admin area
// add a favicon for your admin
function admin_favicon() {
echo ” ;
}
add_action('admin_head', 'admin_favicon');
Custom Admin Login logo
// custom admin login logo
function custom_login_logo() {
echo '
h1 a { background-image: url('.get_bloginfo('template_directory').'/images/custom-login-logo.png) !important; }
';
}
add_action('login_head', 'custom_login_logo');
Disable unused widget areas
// disable all widget areas
function disable_all_widgets($sidebars_widgets) {
//if (is_home())
$sidebars_widgets = array(false);
return $sidebars_widgets;
}
add_filter('sidebars_widgets', 'disable_all_widgets');
Kill the WordPress update nag
// kill the admin nag
if (!current_user_can('edit_users')) {
add_action('init', create_function('$a', “remove_action('init', 'wp_version_check');”), 2);
add_filter('pre_option_update_core', create_function('$a', “return null;”));
}
 Now living in the inputs to the functions.php file and dear,, be the theme for this tutorial so we .. for his demo followed yes, cz not ane stacking ...

Dowload di Link Ebook

Leave a Reply