Welcome Guest, please login or register.
Username:
Password:

News: SEO link style upgrade. Maklumkan kepada saya jika ada error. Theme baru dalam pembikinan, tak tahu bila siap.
Pages: [1] 2 3 ... 5
  Print  
0 Members and 1 Guest are viewing this topic.
Read
November 25, 2006, 12:26:30 PM
mysticmind
Administrator
Hero Member

*****
Posts: 738

Lalang Di Bumi



Ok!!!..
Ini satu perbincangan panjang dan serius.. Jangan bikin kacau.. Kita diskus bersama2. Baik.. aku mulakan..
Pos2 yang tidak sesuai akan di padam.

*******************

Pertamanya, nak buat theme wordpress nih perlukan kepakaran dalam HTML dan juga CSS. Tambahan pula, theme wordpress tidak menggunakan Table tag. Kesemuanya perlu disusun dalam CSS. Belajarlah HTML dan CSS di www.w3.org . Belajar valid coding terus lagi baik. Tak susah.. yang sukar ialah memulakan sesuatu.. Grin

Sebelum itu.. Kita kira ada berapa file dulu yang perlu dalam satu-satu theme.
Baik!.. Ada 7 (saya rasa) sekurang-kurangnya file... Boleh buat kurang kalau korang pandai.

Mengapa perlu banyak file? Ini adalah untuk memudahkan urusan pengubahsuaian.
File lazim adalah seperti berikut :

stylesheet.css
index.php 
header.php
footer.php
sidebar.php
page.php atau single.php
comment.php

Ok.. nanti aku sambung.. or ikram nak sambung..
sesapa pun boleh sambung.. tapi pastikan ikut step.. jangan langkah2..
Logged

 

Read
November 25, 2006, 08:28:23 PM
ikram_zidane
Full Member
***
Posts: 166



first of all,

single.php is not page.php (well, the name should already explain it)..

1) single.php shows one single 'post'
and
2) page.php shows one single 'page'

therefore u must have both..

and archive.php tertinggal..
Logged

good designer redesign, GREAT designer realign
http://ikram-zidane.com
 

Read
November 26, 2006, 02:15:39 PM
CypherHackz
Global Moderator
Sr. Member

*****
Posts: 370

CypherHackz.Net



by default, if archives.php atau single.php atau page.php takde pun, still leh run wordpress tu selagi file index.php still exist.

-cypher.
Logged

 

Read
November 26, 2006, 02:28:03 PM
ikram_zidane
Full Member
***
Posts: 166



yup.. akan balik semula kat index.php..

tapi kalau semua nak refer kat index.php, the wordpress quality as a cms tak diguna kan sepenuhnye la..

ade sumthing yg aku pelik..
Code:
<?php endwhile; ?>
<?php else : ?>
<div class="post">
<h2>Wrong page, ikram-zidane.com</h2>
<p>No result, cowboy !</p>

</div>
</div>
<?php endif; ?>
kalau aku letak kat single.php or page.php , dia tetap refer kat yg kat index.php nyer.. susah hidup betol la..


btw, ni strtucture folder korang kat server,
Logged

good designer redesign, GREAT designer realign
http://ikram-zidane.com
 

Read
November 27, 2006, 12:14:52 AM
mysticmind
Administrator
Hero Member

*****
Posts: 738

Lalang Di Bumi



tertinggal css dia lah ikram. File paling penting tu..

dalam css file kita kene rancang dalam otak.. takpun dalam kertas.. Macammana kita nak 'rekabentuk'-kan rupa wordpress kita. (ermm.. nak mula macammana yer.. )

Aku rasa.. elok kita mulakan dengan CSS file dulu!.. OK!..
Logged

 

Read
November 27, 2006, 01:40:12 AM
ikram_zidane
Full Member
***
Posts: 166



well, aku rasa tak payah guna css dulu la.. make learning so much easier, buat je la sturctural document dia dulu, then user la style up sendiri.. just letak tag with class and id yg suitable..

css is for ease of modifications..

aku biasa buat css dulu, tapi kalau nak belajar, buat structure dulu..
Logged

good designer redesign, GREAT designer realign
http://ikram-zidane.com
 

Read
November 27, 2006, 03:31:26 AM
CypherHackz
Global Moderator
Sr. Member

*****
Posts: 370

CypherHackz.Net



yup.. akan balik semula kat index.php..

tapi kalau semua nak refer kat index.php, the wordpress quality as a cms tak diguna kan sepenuhnye la..

ade sumthing yg aku pelik..
Code:
<?php endwhile; ?>
<?php else : ?>
<div class="post">
<h2>Wrong page, ikram-zidane.com</h2>
<p>No result, cowboy !</p>

</div>
</div>
<?php endif; ?>
kalau aku letak kat single.php or page.php , dia tetap refer kat yg kat index.php nyer.. susah hidup betol la..


btw, ni strtucture folder korang kat server,


untuk itu, kau leh create file 404.php
maksudnye, if post atau file tu tak dijumpai, wordpress akan redirect ke 404.php

k la, aku taknak kacau korang buat tutorial. dah2. gi sambung. he3.

-cypher.
Logged

 

Read
November 27, 2006, 03:39:34 AM
ikram_zidane
Full Member
***
Posts: 166



ok la.. let me start it out,
ok children, this is the most basic of the 'front' page sturcture could be... (please make sure reti (x)html and css, please dont ask of what could be consider as a stupid q)

btw, kita mula design 2 column la..  a single header, one footer, fixed-width style.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>

<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats please -->

<style type="text/css" media="screen">
@import url( <?php bloginfo('stylesheet_url'); ?> );
</style>

<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />

<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_get_archives('type=monthly&format=link'); ?>
<?php //comments_popup_script(); // off by default ?>
<?php wp_head(); ?>
</head>

<body>

<div id="container">
<div id="header"><h1><?php bloginfo('name'); ?></h1></div>

<!-- COPY DARI SINI -->
<div class="post">
<h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" ><?php the_title(); ?></a></h2>
<div class="post-info">Posted by <?php the_author(); ?> on <?php the_time('F j, Y'); ?>. <?php _e(""); ?> <?php the_category(','?> <?php comments_popup_link(__('No Comment'), __('1 Comment'), __('% Comments')); ?></div>

<?php the_content('View all content of this post &raquo;'); ?>
<?php trackback_rdf(); ?>
-->
</div>
<?php endwhile; ?> <!-- end loop loop -->
<?php else : ?>
<div class="post">
<p>no result, cowboy !</p>
<?php endif; ?>

<!-- HABIS COPY KAT SINI -->



<div id="sidebar">Siebar content goes here</div>
<div id="footer">footer content goes here</div>

</div> <!-- closing tag untuk div with id container -->

ikut arahan, copy dari yg aku tulis hingga yg sepatutnya, open a text-editing software, paste.. akan dapat
Code:
<div id="content">

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- Start loop -->

<div class="post">
<h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" ><?php the_title(); ?></a></h2>
<div class="post-info">Posted by <?php the_author(); ?> on <?php the_time('F j, Y'); ?>. <?php _e(""); ?> <?php the_category(','?> <?php comments_popup_link(__('No Comment'), __('1 Comment'), __('% Comments')); ?></div>

<?php the_content('View all content of this post &raquo;'); ?>
<?php trackback_rdf(); ?>
-->
</div>
<?php endwhile; ?> <!-- end loop loop -->
<?php else : ?>
<div class="post">
<p>no result, cowboy !</p>
<?php endif; ?>





</div>

tambah kod call function ni kat line paling atas...
Code:
<?php get_header(); ?>


so akan jadi la macam ni,
Code:
<?php get_header(); ?>
<div id="content">

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- Start loop -->

<div class="post">
<h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" ><?php the_title(); ?></a></h2>
<div class="post-info">Posted by <?php the_author(); ?> on <?php the_time('F j, Y'); ?>. <?php _e(""); ?> <?php the_category(','?> <?php comments_popup_link(__('No Comment'), __('1 Comment'), __('% Comments')); ?></div>

<?php the_content('View all content of this post &raquo;'); ?>
<?php trackback_rdf(); ?>
-->
</div>
<?php endwhile; ?> <!-- end loop loop -->
<?php else : ?>
<div class="post">
<p>no result, cowboy !</p>
<?php endif; ?>





</div>

SAVE AS INDEX.PHP ... except in lowercase, voila.. kan senang.. anybody care to continue ?


=====================================================
Quote
untuk itu, kau leh create file 404.php
maksudnye, if post atau file tu tak dijumpai, wordpress akan redirect ke 404.php

k la, aku taknak kacau korang buat tutorial. dah2. gi sambung. he3.

-cypher.
aku rasa tak jadi gak la.. sama je kalau aku letak kat index.php, aku nak kiranya konon kalau orang tu tersalah kategori (or kategori kosong) kuar ayat lain dari bila seumone tu salah bile salah url..
« Last Edit: November 27, 2006, 03:42:06 AM by ikram_zidane » Logged

good designer redesign, GREAT designer realign
http://ikram-zidane.com
 

Read
November 30, 2006, 09:07:16 PM
mysticmind
Administrator
Hero Member

*****
Posts: 738

Lalang Di Bumi



susah nak faham MASS terus camtuh ikram.

better step by step dan elakkan paste full code..

kita buat simple dulu..

Pertamanya.. (susah nak declare file mana dulu...)
aku ambil header dulu..

header.php

dalam header php nih adalah starting code html..  cukup sekadar:

Code:
<html>
<head>
<title> TAJUK WEB KORANG / PAGE KORANG</title>
</head>
<body>

dekat tajuk / title tuh selalu dipanggil variable 2 bende utama.
<?php bloginfo('name'); ?> = untuk nama web

<?php wp_title(); ?> = Untuk tajuk post etc..

mmg banyak coding tambahan.. kalau buang ada rugi dari sudut engine carian..
Logged

 

Read
November 30, 2006, 10:15:12 PM
ikram_zidane
Full Member
***
Posts: 166



kalau macam tu, baik tukar title, "buat html website"...
Quote
(please make sure reti (x)html and css,
but hey, its ur way.. fine by me..
Logged

good designer redesign, GREAT designer realign
http://ikram-zidane.com
 

Read
December 01, 2006, 12:32:39 AM
CypherHackz
Global Moderator
Sr. Member

*****
Posts: 370

CypherHackz.Net



chop! aku rase kan, better korang buat post sendiri pasal macam mana nak buat themes ni sebab kalau buat macam ni, susah sikit coz sekejap orang baca macam ni, sekejap baca kene buat macam ni pulak.

macam ikram_zidane dah tau tu, leh la suh die tunjukkan step die camne nak buat. yang mistic pulak buat post sendiri macam mana nak buat. then nanti kite buat la satu archive kumpul tutorial kat homepage wpmalaysia.com ni. apa macam?

-cypher.
Logged

 

Read
December 01, 2006, 11:53:40 AM
Bat_infomalaya
Newbie
*
Posts: 40



chop! aku rase kan, better korang buat post sendiri pasal macam mana nak buat themes ni sebab kalau buat macam ni, susah sikit coz sekejap orang baca macam ni, sekejap baca kene buat macam ni pulak.

macam ikram_zidane dah tau tu, leh la suh die tunjukkan step die camne nak buat. yang mistic pulak buat post sendiri macam mana nak buat. then nanti kite buat la satu archive kumpul tutorial kat homepage wpmalaysia.com ni. apa macam?

-cypher.

Saya sokong..setiap orang ada cara dia yang tersendiri..jadi better buat macam ni..
Logged

 

Read
December 01, 2006, 02:37:09 PM
ikram_zidane
Full Member
***
Posts: 166



sorry la.. interested no more.. someone else can write it..
btw mysticmind, i think you need the declaration first..
Logged

good designer redesign, GREAT designer realign
http://ikram-zidane.com
 

Read
December 01, 2006, 02:40:50 PM
reezolution
Newbie
*
Posts: 15



Ala... tgk, ikram dah majuk dah...  Embarrassed
Logged

Ridzwan.Online - http://www.ridzwan.net
 

Read
December 03, 2006, 04:41:49 AM
x3ro
Full Member

***
Posts: 132



betul kate cypher tuh..aku bace dari mule pun penin..dah jd kelam kabut..kalau buat dlm post kat main site wpmalaysia ok skit kot..n then kalau tak paham atau ade masalah baru buke satu thread kat forum nih tuk bertanyer..
Logged
 

Pages: [1] 2 3 ... 5
  Print  
 
Jump to:  

Theme by webtechnica.net