Pages: [1]
  Print  
Author Topic: MAsalah dengan functions.php  (Read 912 times)
0 Members and 1 Guest are viewing this topic.
korokmu
Jr. Member
**
Posts: 66


View Profile
« on: January 01, 2007, 10:42:17 AM »

aku ade buat option page utk satu theme ikut tutorial drpd http://frenchfragfactory.net/ozh/my-projects/wordpress-theme-toolkit-admin-menu/

tapi masalahnye aku dpt error ni apabila edit file theme tu dlm Wordpress

Warning: Cannot modify header information - headers already sent by (output started at /home/jombgnet/public_html/chelseafc/wp-content/themes/internetsharing/functions.php:1) in /home/jombgnet/public_html/chelseafc/wp-admin/theme-editor.php on line 69

Aku dah cek kat Wordpress.org, dier kate surplus whitespace. tapi takde pun. sape yg pernah buat option page utk theme, buleh tulung tak?
Logged
CypherHackz
Global Moderator
Sr. Member
*****
Posts: 370


CypherHackz.Net


View Profile WWW
« Reply #1 on: January 01, 2007, 04:41:27 PM »

aku tak pernah lagi buat options tuk theme coz advanced. aku just gune macam tu je tuk theme aku nih. btw thanks for the link. leh gak aku belaja pe2 yang patut. hu3.

-cypher.
Logged

ikram_zidane
Full Member
***
Posts: 166


View Profile WWW
« Reply #2 on: January 01, 2007, 08:03:24 PM »

http://codex.wordpress.org/Answers-Trouble_Shooting#Headers_already_sent
biasanya ade prob sebelum or selepas <?php or after the closing ?>.
Logged

good designer redesign, GREAT designer realign
http://ikram-zidane.com
korokmu
Jr. Member
**
Posts: 66


View Profile
« Reply #3 on: January 01, 2007, 11:28:24 PM »

dah tgk dah dekat situ. tapi takde apeČ pun sblm dan selepas tu. kosong je. takde surplus whitespace pun. ni code file functions.php

Code:
<?php include(dirname(__FILE__).'/themetoolkit.php'); themetoolkit'mytheme', array( 'option1' => 'About text {textarea|6|50} ## Here goes some description of your weblog''option2' => 'Adsense Publisher ID ## Enter your Adsense Pub-ID e.g. pub-1452791377806575',), __FILE__ ); 
    
function 
about() {
    global 
$mytheme;
    print 
$mytheme->option['setting1'];
}

function 
adsensepubid() {
    global 
$mytheme;
    print 
$mytheme->option['setting2'];
}

?>
Logged
novatech
Newbie
*
Posts: 18


View Profile WWW
« Reply #4 on: January 03, 2007, 12:10:33 PM »

rasanya dalam file themetoolkit.php kot yg ada white space Smiley
kalo dah cek semua masih takde gak, check lagi. mungkin tempat len yg problem tu

satu lagi, kalo ko guna include/require. pastikan takde header sama dalam mana2 page/file. cuba usha balik mana tau kot kot ada

header mesti dok atas sekali dan takleh letak bawah code html Grin
Logged

^_^
Tags:
Pages: [1]
  Print  
 
Jump to: