Your SlideShare is downloading. ×
Word press高级教程.pdf
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Word press高级教程.pdf

3,468
views

Published on

Word press高级教程

Word press高级教程

Published in: Education, Technology, Business

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
3,468
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. WORD PRESSWo srØ~§eYz d šs e P ÿfK~§rHÿ •„WÿY––è •QzÙÿ n.w cn. wlo pg e a c w 9 0 g6 2 8 2 ^t eå
  • 2. vî _U |¾• WORDPRESS N;˜˜R6Ob€]ç .................................................................................................. 6 <?php get_bloginfo (); ?> ÿ ................................................................................................ 6ÿ ;) (nb?> oo<f>y:SZ[¢v„Oá`o? fgp ilh ÿSÂepT ÿgg oot fi_ nle b ....................... 6>;) (gtsi_ÿRˆhf>y:˜u—b”þc¥? sw e l? a< pp _h ............................................................. 6 >;D< ? ry[šQ…[¹˜u( ÿ )(tp I? _h e h •êtP )R¨ubv„ s o D IÿeàSÂepÿ ................................... 6 >)nrh< ? _—R0Q…[¹˜u( ÿ kl tp (i_ h m? e p a UtP Ro L )s ÿeàSÂepÿ ........................................ 6 >;)(lti_t< VÞQ…[¹˜u( ÿf>y:b•Ô ? e thpeh? h˜˜ )to Ps ...................................................... 6>) SjF(_t<? eå_×Sшhv„eågÿY m p , ithh e?e h<_ÿgeå^t ................................... 7 >)(o_t< ÿf>y:eå_×v„O€ÿeàSÂepÿ ? ru p he h th? a .......................................................... 7 <?php the_content(Read the rest of this entry &raquo;); ?>ÿeå_×v„Q…[¹ ............................... 7 <?php the_tags(Tags: , , , <br />); ?>ÿeå_×v„ tag h{~ .................................................... 7 <?php edit_post_link(Edit, , | ); ?>ÿ_Su(b7]òv{_U^vQwggC–Peöÿb@f>y:v„eå_ו•‘”þc¥ ................................................................................................................................................... 7 <?php comments_popup_link(No Comments &#187;, 1 Comment &#187;, % Comments &#187;); ?>ÿeå_×v„‹Ä‹º`ÅQµ ................................................................................................ 7 <?php next_posts_link(&laquo; Older Entries) ?>ÿ•ƒeéeå_טu—bv„”þc¥ .............................. 7 <?php previous_posts_link(Newer Entries &raquo;) ?>ÿ•ƒe°eå_טu—bv„”þ .......................... 7 <?php wp_get_archives(type=monthly);?>ÿcgf>y:Q…[¹[Xhc ............................................. 7 <?php wp_tag_cloud():?>ÿf>y: tag h{~ ............................................................................. 8 <?php get_posts( ); ?>ÿ_—R0eå_×v„Oá`o............................................................................... 8 <?php wp_list_categories(sort_column=&optioncount=&hierarchical=&……);?>ÿqg[W{&˜z c ^•f>y:R|{Rˆh ...................................................................................................................... 10 <?php wp_list_bookmarks(categorize=&title_after=&title_before=&……);?>ÿf>y:SË`Å”þc¥ ................................................................................................................................................. 10 <?php wp_list_pages(sort_column=menu_order&depth=3&title_li=); ?>ÿ f>y:mñ^¦R0 3 v„˜u —b”þc¥..................................................................................................................................... 10 <?php include(TEMPLATEPATH. /searchform.php); ?>ÿŒu( searchform v„e‡Nöubd}"h ------------------------------------------------{, 2 ˜u /Qq60 ˜u -------------------------------------------------
  • 3. ................................................................................................................................................. 10 <?php get_calendar(); ?>ÿŒu( WordPress •ê^&v„eåS† ...................................................... 10WORDPRESS Wúg,j!g•e‡Nö ......................................................................................................... 10 NYW[Œetv„WordPress j!g•^”•óQwgY‚Ne‡Nöÿ ............................................................. 10 Wúg,gaNöR$e-Tag................................................................................................................... 11 Header •èR^8u(R0v„ PHP Qýep............................................................................................. 11 j!g•^8u(v„ PHP QýepSÊT}Nä................................................................................................. 12 Nj!g•vøQsv„QvNÖQýep ........................................................................................................... 12WORDPRESS Qýepb€]ç ................................................................................................................ 13 Loop _ªs¯ÿbRŸÿ ................................................................................................................. 13 W(WordPress v„{,N{Çe‡zàN-cÒQe Google ^•TJÿbRŸÿ ..................................................... 13 e9SØkÏN*R|{˜u—bv„eå_×f>y:ep . ÿbRŸÿ .......................................................................... 14 ~Ùry[šR|{mûR NTj!g•ÿbRŸÿ ........................................................................................ 14 N:ry[šR|{e‡zàR^úNTY‰Â ............................................................................................... 14 h7_SNTR|{ ...................................................................................................................... 15 W(gÐNN*˜u—bSUrìŒu(gÐNN* e‡Nöÿ ............................................................................ 15 php R¨`h˜˜Nå[žs°fôSËY}v„ SEO............................................................................................... 15 R¨`f>y:ƒÜSUÿh9cnR|{Sʘu—b|{W‹f>y:vø^”gavîÿ ......................................................... 15 R¨`f>y:šØN®f>ƒÜSUÿ ........................................................................................................... 16 •ê[šNI˜v•è[ü‚* ...................................................................................................................... 16 gå‹âe‡zà ................................................................................................................................. 17 Query_posts(gå‹âe‡zàÿ )€ýˆ«u(gef>y:ry[še‡zàÿO`b@—PZSêf/O`NN*j!g•e‡Növ„ Loop _YËNKRMŒu(Qýep.................................................................................................................. 17 query_posts() Qýepv„NN›^8‰Áu(lÕ........................................................................................ 17 ƒ·SÖe‡zà ................................................................................................................................. 17 Y‚OUcR|{TŒcgf>y:NN* Archvies [Xhc˜u—b..................................................................... 18 ˜u—bj!g•Y4•èXðf .................................................................................................................. 18 N:NTv„R|{c[šNTv„VþPÏ ............................................................................................... 18 Y‚OUmûR ^{porG BANNER ^•TJ .................................................................................................... 19------------------------------------------------{, 3 ˜u /Qq60 ˜u -------------------------------------------------
  • 4. 5 N*O`Nwå•Sv„ WORDPRESS Qýep............................................................................................. 22WORDPRESS NN›^8u(Nãxÿ ..................................................................................................... 23 f>y:ge°e‡zà .......................................................................................................................... 23 f>y:ge°‹Ä‹º .......................................................................................................................... 23 f>y:pí‹Äe‡zà .......................................................................................................................... 24 Œu(rtr 5 Sê•^” NåN) (av 2 a . G ........................................................................................... 24 Œu(RMN${Çeå_×ÿT~í 3 {Çeå_×Rˆh .................................................................................... 24 –•g:e‡zà ................................................................................................................................. 24 [‰Qhv„Œu( seo W sd cÒNöj!g•Nãx rr p .................................................................................... 25WORDPRESS ^8u(Nãx‰ã‘Ê........................................................................................................ 25 ge°e‡zà . 1 ............................................................................................................................ 25 –•g:e‡zà . 2 ............................................................................................................................ 25 ge°uYŠ . 3 ............................................................................................................................ 26Œu( TAB ˜u{~ƒÜSUÿ .................................................................................................................... 27 mûR Y4e‡NöÿR$e-TŒu(sj d ae h e‡Nö ............................................................................... 27 mûRNãxR0 ss c h7_e‡NöQ… ................................................................................................ 27 mûR b a NãxR0—‰•Œu(v„W0e¹ t ............................................................................................ 28 OÝ[Xsj NãxR0vî_UN ............................................................................................................. 31b@g˜u—bv„_Rhcÿ .......................................................................................................................... 32WORDPRESS N;˜˜N-^8u(Nãx`;~Óÿ .......................................................................................... 34WORDPRESS {€SUONj!g• ,ON•QzÙ[Œb ................................................................................. 37WORDPRESS d-^úON•QzÙ ......................................................................................................... 40 Nÿ WordPress d-^úN-ON•QzÙ`•ï ............................................................................................. 40 NŒÿlèaN‹˜y ..................................................................................................................................... 46R^úoN®v„ WORDPRESS eågc”® ........................................................................................... 47 {,Nkeÿ•“QeNãx ...................................................................................................................... 47------------------------------------------------{, 4 ˜u /Qq60 ˜u -------------------------------------------------
  • 5. {,NŒkeÿ^úzË€ÌfoVþrG ............................................................................................................... 48 {,NkeÿN:QvR^úh7_ ............................................................................................................... 48R^úR¨`v„•n˜ve‡zà ...................................................................................................................... 48gå‹â WORDPRESS SZ[¢•De™v„SQL T}Nä................................................................................... 50~ÙWP mûR CTRL+ENTER VÞY_ëcw•. ...................................................................................... 51WORDPRESS v„ 10 N*g@bK~§ HACK b€]ç .................................................................................. 52 1.SêW(d}"_dÎ~ÓgœN-f>y: AdSense ^•TJ .......................................................................... 52 2.•QMW(Y_ªs¯N-Qús°‘ÍYe‡zà ............................................................................................ 53 3.u(˜uxNãfÿ “N˜u ”TŒ “N˜u ” .................................................................................................. 54 4.•êR¨ƒ·SÖe‡zàVþPÏ............................................................................................................... 55 5.R^ú “SÑ•R0 Twitter”c”® .................................................................................................... 55 6. O•u(vô_S÷ÿ••QM_/_S÷ .................................................................................................. 56 7. Y‚eà Referrer ‹÷lBRy•kbSшh‹Ä‹º .................................................................................. 56 8.W(WordPess [ü‚*gaN-O•u( CSS nÑR¨•è.......................................................................... 57 9. WordPress SZ[¢v~SØY4Vþ .................................................................................................. 58 10.f>y:d°Q™‹¡R ..................................................................................................................... 58O§•¹R Qev{–FuL—bÿ ...................................................................................................................... 59ƒ·SÖSU{Çe‡zàQ…v„Qs•.[WSÊcÏ•ðe¹lÕÿ ........................................................................................ 60------------------------------------------------{, 5 ˜u /Qq60 ˜u -------------------------------------------------
  • 6. |¾• WordPress N;˜˜R6Ob€]ç <?php get_bloginfo (); ?> ÿ u1 WordPress Qýep•êR¨ubv„Oá`oO VÞSZ[¢ÿ q6TQ•W(QvNÖW0e¹O•u(O`v„PHP Nãx •èR^8u(SÂepÿ defaultÿžØ‹¤ nameÿTyð descriptionÿ‹ôf url0 home0 siteurlÿ•QW@ charsetÿ•Q˜uv„•xe¹_ stylesheet_urlÿ css e‡NöW0W@ versionÿSZ[¢b@O•u(v„ WordPress v„v„rHg,ÿ;) og? (fop> n? f>y:SZ[¢v„Oá`o i< b p lh ÿSÂepTe og ÿi_ nb fot g l?;)_?>Rˆhf>y:˜u—b”þc¥ÿ pwap gh t<l sp e_ (i •èR^8u(SÂepÿ post_titleÿch˜˜[Wk͘z^•c’RÿžØ‹¤ÿ post_dateÿcR^úeö•ôc’^• post_modifiedÿcgTOîe9eö•ôc’^• IDÿcqg id c’^• post_authorÿcqgO€ id c’^• ?? >D ÿ)I <( ;p h e h _ t ry[šQ…[¹˜u(tR¨ubv„ p •ê P ) o s DÿeàSÂepÿ I <m ?el hr_—R0Q…[¹˜u(ÿeàSÂepÿ >k p(a ÿi e h _ tn p) Ut R P ) o Ls ?)(lth ÔVÞQ…[¹˜u(t >e<p ÿf>y:b• ; ? p ih e_ t h˜˜ P ) os u(lÕÿ <?php the_title(before,after,display); ?> beforeÿ[W{&N2ÿh˜˜RM—bv„e‡[WÿžØ‹¤`ÅQµNNf>y:ÿ ÿ afterÿ[W{&N2ÿh˜˜RM—bv„e‡[WÿžØ‹¤`ÅQµNNf>y: ÿ displayÿ^ÿ_S^P<N:weöÿf>y:h˜˜ÿžØ‹¤ÿ_S^P<N:PGeöÿ_— ÿ ÿ R0h˜˜v„P<OFNf>y: ------------------------------------------------{, 6 ˜u /Qq60 ˜u -------------------------------------------------
  • 7. >) SjFi_<? eå_×Sшhv„eågÿY mtp , (t h e? e h h<_ÿgeå^t >)(hh< ? f>y:eå_×v„O€ÿeàSÂepÿ ÿ oep ruth t? a _ <?php the_content(Read the rest of this entry &raquo;); ?>ÿeå_×v„Q…[¹ u(lÕÿ <?php the_content(more_link_text, strip_teaser, ); ?> more_link_textÿ[W{&N2ÿ_Seå_×g ÿ ÿ more h‹°eöÿ”þc¥R0eå_טu—b strip_teaserÿ^ÿeå_× ÿ ÿ “fôY ””þc¥v„–•…Ïÿ trueÿbf>y:ÿ falseÿžØ‹¤ÿ ÿ <?php the_tags(Tags: , , , <br />); ?>ÿeå_×v„ tag h{~ u(lÕ ÿ <?php the_tags ( before , separator , after ); ?> beforeÿ[W{&N2ÿu(W(h{~v„RM—bÿžØ‹¤N: “tagsÿ ” ÿ separatorÿ[W{&N2ÿR–”{&ÿžØ‹¤`ÅQµNNf>y: ÿ afterÿ[W{&N2ÿu(W(h{~v„T—bÿžØ‹¤`ÅQµNNf>y: ÿ <?php edit_post_link(Edit, , | ); ?>ÿ_Su(b7]òv{_U^vQwggC–Peöÿb@f>y:v„eå_ו•‘ ”þc¥ <?php comments_popup_link(No Comments &#187;, 1 Comment &#187;, % Comments &#187;); ?>ÿeå_×v„‹Ä‹º`ÅQµ <?php next_posts_link(&laquo; Older Entries) ?>ÿ•ƒeéeå_טu—bv„”þc¥ <?php previous_posts_link(Newer Entries &raquo;) ?>ÿ•ƒe°eå_טu—bv„”þ <?php wp_get_archives(type=monthly);?>ÿcgf>y:Q…[¹[Xhc u(lÕÿ <?php wp_get_archives(type=&limit= &format=&before=&after=&show_post_count=) SÂepSÊP<ÿ type ÿ[W{&N2ÿf>y:hchHv„e¹lÕ l yearly ÿ^t l monthly (žØ‹¤) ÿg l daily ÿeå l weekly ÿTh limit ÿ[W{&N2ÿf>y:e‡zàepvîv„–PR6ÿžØ‹¤`ÅQµNeà–PR6 formatÿ[W{&N2ÿe‡hcnSUv„h<_ ÿ htmlÿmûR HTML Rˆhÿ <li> ÿh{~ÿžØ‹¤ÿ optionÿmûR •béÿ <select> ÿbNbÉ_•˜yÿ <option> ÿh‹° linkÿmûR ”þc¥ÿ <link>ÿh‹° customÿ•ê[šNIRˆhO•u(NKRMTŒNKTv„[W{&N20 beforeÿ[W{&N2ÿ_Sg ÿ format h‹°eöu(W( format RM—b ------------------------------------------------{, 7 ˜u /Qq60 ˜u -------------------------------------------------
  • 8. afterÿ[W{&N2ÿ_Sg ÿ format h‹°eöu(W( format T—bshow_post_countÿ^ÿf/T&f>y:e‡hc‘Ì—beå_×v„epvîÿ ÿ 1 f>y: 0 Nf>y:ÿžØ‹¤ÿ<?php wp_tag_cloud():?>ÿf>y: tag h{~u(lÕÿ<?php wp_tag_cloud(smallest=,largest=,unit=,number=,format=,orderby=name,order=ASC,exclude=,include=); ?>SÂepÿsmallest ÿ etep ÿe‡[Wv„g:[øÿ unit ~ÙNˆSUOMÿ ÿlargestÿ etep ÿe‡[Wv„gY:[øÿ unit ~ÙNˆR SUOMÿunit ÿ [W{&N2ÿ~Ù smallest TŒlargesti mûR v„SUOMnumberÿ ÿ etep ÿf>y:v„ tag v„epvîformat ÿ [W{&N2ÿh{~N‘f>y:v„h<_P<ÿ l flatÿu1zzh<R_ÿžØ‹¤ÿ l listÿNåg^•Rˆhc’R l arrayÿh{~ˆ«e>W(NN*ep~Ä‘Ì—bÿ^vNQýeph{~N‘•ÔVÞN:Œu(0lèaÿep~Äf/ •ÔVÞÿ€Nf>y:orderbyÿÿ [W{&N2ÿh{~v„c’Rv„˜z^•P<ÿ l nameÿT[WÿžØ‹¤ÿ l countÿep[Worder ÿ [W{&N2ÿc’^•v„k!^•ÿ‰•YQ™bMgeHÿP<ÿ l ASCÿSG^•ÿžØ‹¤ÿ l DESCÿ–M^• l RANDÿ–•g:excludeÿÿ [W{&N2ÿc’–dgÐN*ry[šv„h{~includeÿ ÿ [W{&N2ÿSêST+gÐN*ry[šv„h{~<?php $myposts=get_posts(numberposts=10$offset=1);foreach($mypostsas $post):?><li><a href="<?php the_permalink();?>"><?php the_title();?></a></li><?phpendforeach;?>ÿf>y:NÎ{,N{Ç_YËSÖ 10 {Çeå_×v„Rˆh<?php get_posts( ); ?>ÿ_—R0eå_×v„Oá`ou(lÕÿ <?php get_posts(numberposts=, offset=, category=, category_name=,tag=, orderby= ,……); ?> SÂepSÊP<ÿnumberpostsÿ etep ÿ•ÔVÞeå_×v„epvîÿžØ‹¤P<ÿ 5 ÿoffsetÿ etep ÿge°e‡zàv„•wYËp¹ÿžØ‹¤P<ÿ ÿ 0categoryÿ etep ÿSêf>y:•ÙN|{R+v„e‡zàÿh9cn ÿ IDÿžØ‹¤P<ÿeà ÿcategory_nameÿÿ [W{&N2ÿSêf>y:•ÙN|{R+v„e‡zàÿh9cnTyðb•)Q™ÿžØ‹¤P<ÿeà ÿtagÿ ÿ [W{&N2ÿSêf>y:•ÙNh{~v„e‡zàÿ‚ågYN*h{~ÿu(•S÷–”_ÿRN------------------------------------------------{, 8 ˜u /Qq60 ˜u -------------------------------------------------
  • 9. N*Nf>y:ÿ^”u(zzh<–”_orderbyÿ ÿ [W{&N2ÿe‡zàv„c’R˜z^•ÿžØ‹¤ÿ post_dateÿP<ÿl authorÿO€ idl categoryÿR|{ idl contentÿQ…[¹ idl dateÿeåg idl IDÿe‡zàg,Ž«v„ idl menu_orderÿcƒÜSUT}NäÿSê^”u(NŽ•Q˜u pageÿl mime_typeÿc MIME |{W‹ÿSê^”u(NŽ^&–DNöv„ÿl modifiedÿgTOîe9v„eågl nameÿc•)ueTl parentÿcr6e‡zàv„ idl passwordÿc[Æxl randÿ–•g:l statusÿcr¶`l titleÿch˜˜l typeÿc|{W‹orderÿ [W{&N2ÿc’^•v„k!^•ÿ‰•YQ™bMgeHÿ ÿ P<ÿl ASCÿSG^•l DESCÿ–M^•ÿžØ‹¤ÿ ÿincludeÿ [W{&N2ÿf>y:båggÐN› ID v„e‡zàÿYN*Nå•S÷0 /0zzh<–”_ÿžØ‹¤P<ÿeàexcludeÿÿ [W{&N2ÿc’–dbåggÐN› ID v„e‡zàÿYN*Nå•S÷0 /0zzh<–”_ÿžØ‹¤P<ÿeàmeta_key TŒmeta_valueÿ [W{&N2ÿSêf>y:•£N›gry[š•.P<[ùv„•ê[šNIWßÿY‚gœ‰•u( ÿ ÿv„‹ÝÿN$N*P<N•wÿžØ‹¤P<ÿeàpost_typeÿÿ [W{&N2ÿe‡zàv„|{W‹P<ÿl postÿžØ‹¤ÿl pagel attachmentl anypost_statusÿ ÿ [W{&N2ÿgåwe‡zàv„rykŠr¶` P<ÿl publishÿžØ‹¤ÿl privatel draftl futurel inheritpost_parentÿ ÿ etep ÿSêf>y:•ÙN*båg•ÙN* id v„e‡zàv„[Pe‡zàÿžØ‹¤P<ÿeànopagingÿ ÿ ^ ÿT/u(by•u(R˜uÿžØ‹¤P<ÿeà------------------------------------------------{, 9 ˜u /Qq60 ˜u -------------------------------------------------
  • 10. <?php wp_list_categories(sort_column=&optioncount=&hierarchical=&……);?>ÿcqg[W{&˜z^•f>y:R|{RˆhSÂep show_option_all ÿ [W{&N2ÿ_S style ‹¾•nN: list v„eöPÿOgNN*P<gef>y:R0b@gR|{v„”þc¥ÿžØ‹¤f/Nf>y:b@g”þc¥orderbyÿÿ [W{&N2ÿc’^•v„O•cnÿžØ‹¤P<ÿ nameP<ÿl IDl nameÿžØ‹¤ÿl countorderÿ ASCÿSG^•ÿb DESCÿ–M^•ÿshow_last_updateÿf/ÿwÿT&ÿPGÿf>y:gTOîe9eö•ôÿ 1 N:wÿ 0ÿžØ‹¤ÿN:PGstyleÿ [W{&N2ÿf>y:R|{v„e¹_ÿP<ÿ ÿ listÿžØ‹¤ÿ none ÿshow_countÿ ÿ ^ ÿf/ÿwÿT&ÿPGÿf>y:eå_×v„epvîÿ 1 N:wÿ 0ÿžØ‹¤ÿN:PGhide_emptyÿ ÿ ^ ÿf/ÿwÿT&ÿPGÿ–•…Ïeàeå_×v„R|{ÿ 1ÿžØ‹¤ÿN:wÿ 0 N:PGuse_desc_for_titleÿ ^ ÿ ÿf/ÿwÿT&ÿPGÿ~Ùh˜˜‹¾•nR|{Oá`oÿ 1ÿžØ‹¤ÿN:wÿ 0N:PGchild_ofÿ ÿ etep ÿSêf>y:•ÙN*R|{v„[PR|{ÿl¡gžØ‹¤P<excludeÿ–dN†includeÿSêSbìhierarchicalÿÿ ^ ÿf/ÿwÿT&ÿPGÿ‹©[PR|{f>y:eö•)•Ûÿ 1ÿžØ‹¤ÿN:wÿ 0 N:PGnumberÿ ÿ etep ÿ‹¾•nf>y:v„epvîÿžØ‹¤eà–PR6echoÿÿ ^ ÿ_—R0v„~Ógœf/ÿwÿT&ÿPGÿ[XW(NN*SØ‘ÏN-ÿ 1ÿžØ‹¤ÿN:wÿ 0 N:PGdepthÿÿ etep ÿf>y:R|{v„mñ^¦ÿ 0ÿžØ‹¤ÿN:eà–PR6<?php wp_list_bookmarks(categorize=&title_after=&title_before=&……);?>ÿ f>y:SË`Å”þc¥<?php wp_list_pages(sort_column=menu_order&depth=3&title_li=); ?>ÿf>y:mñ^¦R0 3 v„˜u—b”þc¥<?php include(TEMPLATEPATH. /searchform.php); ?>ÿŒu( searchform v„e‡Nöubd}"h<?php get_calendar(); ?>ÿŒu( WordPress •ê^&v„eåS†WordPress Wúg,j!g•e‡NöNYW[Œetv„ WordPress j!g•^”•óQwgY‚Ne‡Nöÿ • cy slt es . C( Sh7_ˆh) S : e‡Nö------------------------------------------------{, 10 ˜u /Qq60 ˜u -------------------------------------------------
  • 11. • p n h d p e .i x N;˜uj!g• : • pia hr p e v.c h Cr: ei yA g e v o a /c rh t j!g• • p 4 h 0p 4 . Ft: o •‹ï˜uj!g• N un d o • om cpn me ht p . s uYŠ/ : VÞYj!g• • prtf ho p.e F: e rt!g• o j • pr h p ea .e d H!g• e a de : r j • pr hi p d e .a bs O§hj!g• : • p ah g p e. Q…[¹˜u() : Pa j!g• ge • pg hli ps e .n Q…[¹˜u( : j!g• P )o t s • m p oh re ph c s . fr a d}"ˆhSUj!g• : • ph ph c e s .r a d}"~Ógœj!g• :_Sq6ÿQwOSR0ry[šv„gÐk>j!g•ÿSï€ýNkb•ÙN›e‡NöÿOFN‚,€Šÿ•ÙN›e‡Nöf/kÏYWj!g•b@_ÅYv„0Wúg,gaNöR$e- Tag • s)( _e h o mi f/T&N:N;˜u : • )(gi es n l_ i f/T&N:Q…[¹˜u( : P )o t s • s _ p a )i ge ( f/T&N:Q…[¹˜u() : P a g e • )ei (c y g_ s o a r t f/T&N:v˜u : eC ha co A irr e /t y g • )(i ag _ s t f/T&N: T[Xhc˜u : ag • )s e _ (ti da f/T&N:c[šeåg[Xhc˜u : • )s _ (r e ya i f/T&N:c[š^tNý[Xhc˜u : • s(t _o m)n i h f/T&N:c[šgNý[Xhc˜u : • s _ )y da ( i f/T&N:c[šeå[Xhc˜u : • mi )( ie _ s t f/T&N:c[šeö•ô[Xhc˜u : • )(ci er va h _ s i f/T&N:[Xhc˜u : • )e _ s h c (i ar f/T&N:d}"~Ógœ˜u : • s _ 4 )( 04 i f/T&N:F4 : H: oP N u4 nT dT o •‹ï˜u t 0 • s( _ p ag ) e id N;˜u/ : v˜uf/T&NåY˜uf>y: ero hr ca A iC e y /t gHeader •èR^8u(R0v„ PHP Qýep • <?php bloginfo(’name’); ?> : SZ[¢Tyð (Title) • <?php bloginfo(’stylesheet_url’); ?> : CSS e‡Nö•ï_„ • <?php bloginfo(’pingback_url’); ?> : PingBack Url • <?php bloginfo(’template_url’); ?> : j!g•e‡Nö•ï_„ • <?php bloginfo(’version’); ?> : WordPress rHg, • <?php bloginfo(’atom_url’); ?> : Atom Url • <?php bloginfo(’rss2_url’); ?> : RSS 2.o Url • <?php bloginfo(’url’); ?> : SZ[¢ Url • <?php bloginfo(’html_type’); ?> : SZ[¢•Q˜u Html |{W‹------------------------------------------------{, 11 ˜u /Qq60 ˜u -------------------------------------------------
  • 12. • <?php bloginfo(’charset’); ?> : SZ[¢•Q˜u•x • <?php bloginfo(’description’); ?> : SZ[¢cÏ•ð • <?php wp_title(); ?> : ry[šQ…[¹˜u(Post/Page)v„h˜˜j!g•^8u(v„ PHP QýepSÊT}Nä • <?php get_header(); ?> : Œu( Header j!g• • <?php get_sidebar(); ?> : Œu( Sidebar j!g• • <?php get_footer(); ?> : Œu( Footer j!g• • <?php the_content(); ?> : f>y:Q…[¹(Post/Page) • <?php if(have_posts()) : ?> : hÀgåf/T&[XW(Post/Page • <?php while(have_posts()) : the_post(); ?> : Y‚gœ[XW( Post/Page RNˆNå f>y: • <?php endwhile; ?> : While ~Óg_ • <?php endif; ?> : If ~Óg_ • <?php the_time(’[W{&N2 ?> : f>y:eö•ôÿeö•ôh<_u1 “[W{&N2SÂepQ³[šÿ ’) ” QwOSS€ HP bKQŒ P • <?php comments_popup_link(); ?> : kce‡N-v„uYŠ”þc¥0Y‚gœO•u( comments_popup_script() ÿRuYŠOW(e°z—SãN-bS_ÿSÍNKÿRW(_SRM z—SãbS_ • <?php the_title(); ?> : Q…[¹˜u (Post/Page)h˜˜ • <?php the_permalink() ?> : Q…[¹˜u (Post/Page) Url • <?php the_category(’, ‘) ?> : ry[šQ…[¹˜u (Post/Page)b@^Category • <?php the_author(); ?> : O€ • <?php the_ID(); ?> : ry[šQ…[¹˜u (Post/Page) ID • <?php edit_post_link(); ?> : Y‚gœu(b7]òv{_U^vQwggC–Pÿf>y:••‘”þc¥ • <?php get_links_list(); ?> : f>y: Blogroll N-v„”þc¥ • <?php comments_template(); ?> : Œu(uYŠ /VÞYj!g• • <?php wp_list_pages(); ?> : f>y: Page Rˆh • <?php wp_list_categories(); ?> : f>y: Categories Rˆh • <?php next_post_link(’ %link ‘); ?> : NN{Çe‡zà”þc¥ • <?php previous_post_link(’%link’); ?> : NN{Çe‡zà”þc¥ • <?php get_calendar(); ?> : eåS† • <?php wp_get_archives() ?> : f>y:Q…[¹[Xhc • <?php posts_nav_link(); ?> : [ü‚*ÿf>y:NN{Ç /NN{Çe‡zà”þc¥ • <?php include(TEMPLATEPATH . ‘/e‡NöT’); ?> : ]LQeQvNÖe‡NöÿSïN: [šR6v„j!g•bQvNÖ|{W‹e‡NöNj!g•vøQsv„QvNÖQýep • <?php _e(’Message’); ?> : •“Qúvø^”Oá`o • <?php wp_register(); ?> : f>y:lèQŒ”þc¥ • <?php wp_loginout(); ?> : f>y:v{_U /lè•”þc¥------------------------------------------------{, 12 ˜u /Qq60 ˜u -------------------------------------------------
  • 13. • <!–next page–> : _SRMQ…[¹R˜u • <!–more–> : _SRMQ…[¹b*e-ÿNåNW(N;˜u/vî_U˜uf>y:Qh•èQ…[¹ • <?php timer_stop(1); ?> : •Q˜uR •}eö•ô (yÒ) • <?php echo get_num_queries(); ?> : •Q˜uR •}gå‹â‘ÏWORDPRESS Qýepb€]çLoop _ªs¯ ÿbRŸÿ<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>// the code inside the loop //cÒQe Loop N-v„Nãx<?php endwhile; ?><?php else : ?><?php endif; ?>W(WordPress v„{,N{Çe‡zàN-cÒQeGoogle ^•TJ ÿbRŸÿ<?php while ( have_posts() ): the_post(); $count++;?><?php if ($count == 1) : ?>// Insert your Google AdSense code here<?php endif; ?><?php endwhile; ?>O`Th7SïNåe9SØ count P<ge‹©^•TJkÔY‚e>W(NTv„eå_×T—bÿkÔY‚e9bcount == 2, RbŠGoogle ^•TJf>y:W({,NŒ{Çeå_×T—b :------------------------------------------------{, 13 ˜u /Qq60 ˜u -------------------------------------------------
  • 14. e9SØkÏN*R|{˜u—bv„eå_×f>y:ep . ÿbRŸÿO`—‰•bS_ category.php e‡Nö^vNb~R0N—bv„•ÙˆL ,W( ?php if (have_posts()) : ?> <N—bmûR Q…[¹ÿ<?php if (is_category(1)) {$posts = query_posts ($query_string.&showposts=1); } ?><?php if (is_category(16)) {$posts = query_posts($query_string.&showposts=2); } ?>“is_category()”1f/R|{ IDÿkÔY‚SïNåQ™b”is_category(’5′)”, “showposts=4″ ‘Ì—bv„epP<1f/O`‰•f>y:v„R|{eå_×ep0~Ùry[šR|{mûR NTj!g• ÿbRŸÿY‚gœO``ó~Ù N: 7 v„R|{R6ONN*TŒO`vîRMN;˜˜NNh7v„Y‰ÂÿSê—W(O`_SRMN;˜˜e‡NöY9 IDN-R^úNN*TN: category-7.php v„j!g•e‡Nöÿq6T•ê[šNIbUœk"v„h7_ÿ WordPress O•êR¨gåw^vf>y:[ƒÿ‹÷lèae‡NöTN-v„ "-"{&S÷0N:ry[šR|{e‡zàR^úNTY‰ÂPG‹¾O`gN$N*R|{ÿRR+TN: "News"TŒ "Tutorials"ÿq6TO``ó‹© "News"R|{‘Ìv„SU{Çe‡zàv„Y‰ÂˆhBN:style1.cssÿ "Tutorials"R|{‘Ìv„SU{Çe‡zàY‰ÂˆhBN: style2.cssÿ Lorelle cÐO› ‹©N†NåN•ÙyÍkÔ•ƒ{€SUv„‰ãQ³e¹lÕÿbS_ single.php e‡Nöÿ^vR –d‘Ì—bv„b@gNãxÿmûR NåNNãxÿ <?php $post = $wp_query->post; if ( in_category(9) ) { include(TEMPLATEPATH . /single2.php); } else { include(TEMPLATEPATH . /single1.php);}?>•^8`ÅQµNÿ PHP O•êR¨gå‹â•ÙkµNãxÿ ‚gœeå_×v„R|{ Y ID N: 9ÿ O•êR¨f>y: R single2.phpÿY‚gœNf/ROf>y:N: single1.php0 lèaÿ single1.php TŒ single2.php ‘Ìv„h7_•ê[šNIÿ|û~ßO•êR¨R$e-R •}NTv„h7_f>y:------------------------------------------------{, 14 ˜u /Qq60 ˜u -------------------------------------------------
  • 15. h7_SNTR|{Y‚gœO``ó~Ùry[šR|{‰Ä[šNTv„h7_ˆhÿO`b@—PZv„Sêf/W(header.php e‡Növ„h{~N-R QeNåNNãxÿ<?php if ( is_category(15) ) { ?><link rel="stylesheet" href="<?php bloginfo(template_url); ?>/cat-15.css"type="text/css" media="screen" />;<?php } else { ?><link rel="stylesheet" href="<?php bloginfo(stylesheet_url); ?>" type="text/css"media="screen" /><?php } ?>W(gÐNN*˜u—bSUrìŒu(gÐNN* e‡Nöÿ php index.php e‡NöN-Q™QeNåNNãxÿY‚gœO`NÅ`óW(™–˜uf>y:gÐN*e‡NöQ…[¹ÿSïW(<div> <?php if ( is_home() ) { include (TEMPLATEPATH./test.php); } ?> </div><div> <?php if ( is_category(1) ) { include (TEMPLATEPATH./test.php); } ?> </div>˜u—bf>y:ry[šQ…[¹ÿSÖT[WR0 is_page(‘* ’)ÿ ÿ<div> <?php if( is_page(contact)) { include (TEMPLATEPATH./test.php); } ?> </div>//R$e-f/N contact ˜u—b /// is_posted()R¨`h˜˜Nå[žs°fôSËY}v„ SEOfÿcbÿ header.php Q… <title><?php bloginfo(name); wp_title(); ?></title><?php if (is_home()) { echo bloginfo(name); } elseif (is_404()) { bloginfo(name); echo - Oops, this is a 404 page; } else if ( is_search() ) { bloginfo(name); echo ( - Search Results);} else { bloginfo(name); echo ( - ); wp_title(); }?>R¨`f>y:ƒÜSUÿh9cnR|{Sʘu—b|{W‹f>y:vø^”gavîÿ------------------------------------------------{, 15 ˜u /Qq60 ˜u -------------------------------------------------
  • 16. <!--Begin an unordered list the ID is for the bookmark, the class is for the style (so I can have other lists with the same styling as seen on RedScrubs.com)--> <ul id="nav" class="btn"><!--IF the current page is the 404 page, note the added error class--> <?php if(is_404()) { ?> <li class="current_page_item error"><a href="#">404 Error</a></li> <?php } ?> <!--IF the current page is the search results page--> <?php if(is_search()) { ?> <li class="current_page_item"><a href="#">Search Results</a></li> <?php } ?><!--IF the current page is a single post--> <?php if(is_single()) { ?> <li class="current_page_item"><a href="#">Selected Article</a></li> <?php } ?>R¨`f>y:šØN®f>ƒÜSUÿR¨`R •} css h7_ÿ<ul id="nav"> <li<?php if ( is_home() || is_category() || is_archive() || is_search() || is_single() ||is_date() ) { echo class="current"; } ?>><a href="#">Gallery</a></li> <li<?php if ( is_page(about) ) { echo class="current"; } ?>><a href="#">About</a></li> <li<?php if ( is_page(submit) ) { echo class="current"; } ?>><ahref="#">Submit</a></li></ul>•ê[šNI˜v•è[ü‚*<ul id="nav"> <li <?php if ( is_home() || is_category() || is_archive() || is_search() || is_single() ||is_date() ){ echo class="current"; } ?>><a href="<?php bloginfo(url); ?>">™–˜u /a></li> < <li <?php if ( is_page(about) ) { echo class="current"; } ?>> <a href="<?php echo/index.php/about ; ?>">QsNŽ/a> </li> < <li <?php if ( is_page(liuyan) ) { echo class="current"; } ?>> <a href="<?php echo/index.php/liuyan ; ?>">uYŠg• </a> </li></ul>------------------------------------------------{, 16 ˜u /Qq60 ˜u -------------------------------------------------
  • 17. gå‹âe‡zàQuery_posts(gå‹âe‡zàÿ )€ýˆ«u(gef>y:ry[še‡zàÿO`b@—PZSêf/O`NN*j!g•e‡Növ„ Loop_YËNKRMŒu(QýepSêf>y:gÐN*R|{N-v„e‡zàY‚gœO``óf>y:gÐN*ry[šR|{v„N[švî_Uv„e‡zà<?php query_posts(cat=15&showposts=10); ?> //•Ù‘ÌROf>y:R|{ ID N: 15v„ge° 10{Çe‡zà0NΙ–˜uyû–dry[šR|{<?php if (is_home()) { query_posts("cat= -3"); } ?> //NÎN;˜uNyû–dR|{N: 3 v„b@geå_×0hÀ}"gÐ{Çe‡zà<?php query_posts(p=3); ?> Sêf>y: post-id N: 3 v„˜u—b0query_posts() Qýepv„NN›^8‰Áu(lÕf/ page €Nf/ post<?phpquery_posts(page_id=1); // Sêf>y: id=1 v„˜u—bquery_posts(pagename=about); // Sêf>y:˜u—bT[WSëabout v„˜u—b?>ƒ·SÖe‡zàget_posts f/NN*{€SUv„O`SïR)u(Y_ªs¯NåNTe¹_•WRe‡zàv„h{~ÿ O‹Y‚O``ó•WRge°v„5 N*gavîÿNãxSïY‚Nÿ<div> <h2> ge°e‡zà </h2> <?php $previous_posts = get_posts(numberposts=5); foreach($previous_posts as $post) : setup_postdata($post); ?> <li><a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php------------------------------------------------{, 17 ˜u /Qq60 ˜u -------------------------------------------------
  • 18. the_title(); ?></a></li> <?php /*?><?php the_content(); ?><?php */?> <?php endforeach; ?> </div> N—bv„NãxN-SØ‘Ï "numberposts=ÿ "RTJ‹É WordPress W(_ªs¯‘Ì}"_TŒXkQEYe‡zàÿ WordPress e‡zàh<_Qýepsetup_postdata()O•êR¨XkQEb@—Qýepÿ Y‚OUcR|{TŒcgf>y:NN* Archvies [Xhc˜u—b <?php while(have_posts()) : the_post(); ?> <ul><?php wp_get_archives(type=monthly&show_post_count=1) ?></ul> <ul><?php wp_list_cats(sort_column=name&optioncount=1) ?></ul> <?php endwhile; ?> O•u( wp_list_cats h{~f>y:NN*cR|{c’Rv„ WordPress [XhcRˆhTŒ wp_get_archives f>y:WúNŽeågv„[XhcRˆh0 ˜u—bj!g•Y4•èXðf <?php/* Template Name: Gallery */ ?> N:NTv„R|{c[šNTv„VþPÏ ?) )1ir<p > s( fi : _?ep ch a gy o t (> =l/ptai/ t0;)ets b ml m er a m ? _f 1 up . lilg >< ? p rb c o= n ( h ?) )1ir<p > 6( fp : _ ? s( s ee c il a e ghy o t> =l/ptai/ t1;)ets b ml m er a m ? _f 6 up . lilg >< ? p rb c o= n ( h ?e >h <p ?i ;f pn d N;˜u/ :s(v˜uf/T&NåY˜uf>y: Ù‘Ìf/cf/T&f/R˜uv„{, 2 _ eC pA a co g ha ) irr ee i y d /t g ÿ• ÿ 34 ÿÿÿ˜u0 ÿi( f/cR˜uv„{,N˜u _ s p a g )e d ------------------------------------------------{, 18 ˜u /Qq60 ˜u -------------------------------------------------
  • 19. Y‚OUmûR ^{porG banner ^•TJW(_YËNKRMbNì—‰•QHN•} SmoothGallery 2.01) b@—e‡Nöe>R0T•v„W0e¹‰ãS‹N•}R0v„ smoothgallery‰ãS‹_—R0v„ ss e‡NöY9YR6R0 ordpress vî_U wp-content/themes/your_theme_name c w scripts e‡NöY9YR6R0 p-content/themes/your_theme_name w2) W( header.php ‘ÌmûR ÿ<script type="text/javascript" src="<?phpbloginfo(template_url); ?>/huandeng/scripts/mootools.v1.11.js"></script><!--<!–JS SmoothGallery–>--><script type="text/javascript" src="<?phpbloginfo(template_url); ?>/huandeng/scripts/jd.gallery.js"></script><?php /*?><?php wp_head();?><?php */?>S»c‰kdˆLÿ Nq6N€ý[žs°0Nwå•SNÀNHSŸVàÿwp_head();‘Ì—bf/QvNÖcÒNö‘Ì—bv„h7_b€f/QvNÖŒu(NãxÿY‚gœS»c‰kdˆLv„‹ÝeàlÕf>y:N†ÿb@NåSê€ýbŠNÖNìb@—‰•v„Nãxvôc¥Q™•ÛN;˜˜v„h7_j!g•Q…•ÛˆL~ßNŒu(0SïNå‰ãQ³•î˜˜03) e°^úNN*e‡Nöhuandeng.phpmûR Nãxÿ<!-- Initialization of SmoothGallery--><script type="text/javascript"> function startGallery() { var myGallery = new gallery($(myGallery), { timed: false }); } window.addEvent(domready,startGallery); </script><!-- Creation of the html for the gallery --> <div class="content"> <div id="myGallery"> <div class="imageElement"> <h3>Item 1 Title</h3> <p>Item 1 Description</p> <a href="#" title="open image" class="open"></a> <img src= <?phpbloginfo(template_url); ?>/huandeng/images/brugges2006/1.jpg class="full" /> <img src=<?phpbloginfo(template_url); ?>/huandeng/images/brugges2006/1-mini.jpg class="thumbnail" />------------------------------------------------{, 19 ˜u /Qq60 ˜u -------------------------------------------------
  • 20. </div> <div class="imageElement"> <h3>Item 2 Title</h3> <p>Item 2 Description</p> <a href="#" title="open image" class="open"></a> <img src=" <?phpbloginfo(template_url); ?>/huandeng/images/brugges2006/2.jpg" class="full" /> <img src="<?phpbloginfo(template_url); ?>/huandeng/images/brugges2006/2-mini.jpg" class="thumbnail" /> </div> <div class="imageElement"> <h3>Item 3 Title</h3> <p>Item 3 Description</p> <a href="#" title="open image" class="open"></a> <img src="<?phpbloginfo(template_url); ?>/huandeng/images/brugges2006/3.jpg" class="full" /> <img src="<?phpbloginfo(template_url); ?>/huandeng/images/brugges2006/3-mini.jpg" class="thumbnail" /> </div> <div class="imageElement"> <h3>Item 4 Title</h3> <p>Item 4 Description</p> <a href="#" title="open image" class="open"></a> <img src="<?phpbloginfo(template_url); ?>/huandeng/images/brugges2006/4.jpg" class="full" /> <img src="<?phpbloginfo(template_url); ?>/huandeng/images/brugges2006/4-mini.jpg" class="thumbnail" /> </div> <div class="imageElement"> <h3>Item 5 Title</h3> <p>Item 5 Description</p> <a href="#" title="open image" class="open"></a> <img src="/huandeng/images/brugges2006/5.jpg" class="full" /> <img src="/huandeng/images/brugges2006/5-mini.jpg" class="thumbnail" /> </div> <div class="imageElement"> <h3>Item 6 Title</h3> <p>Item 6 Description</p> <a href="#" title="open image" class="open"></a> <img src="<?phpbloginfo(template_url); ?>/huandeng/images/brugges2006/6.jpg" class="full" /> <img src="<?phpbloginfo(template_url); ?>/huandeng/images/brugges2006/6-mini.jpg" class="thumbnail" /> </div>------------------------------------------------{, 20 ˜u /Qq60 ˜u -------------------------------------------------
  • 21. <div class="imageElement"> <h3>Item 7 Title</h3> <p>Item 7 Description</p> <a href="#" title="open image" class="open"></a> <img src="<?phpbloginfo(template_url); ?>/huandeng/images/brugges2006/7.jpg" class="full" /> <img src="<?phpbloginfo(template_url); ?>/huandeng/images/brugges2006/7-mini.jpg" class="thumbnail" /> </div> <div class="imageElement"> <h3>Item 8 Title</h3> <p>Item 8 Description</p> <a href="#" title="open image" class="open"></a> <img rc="<?phpbloginfo(template_url); ?>/huandeng/images/brugges2006/8.jpg" class="full" /> <img src="<?phpbloginfo(template_url); ?>/huandeng/images/brugges2006/8-mini.jpg" class="thumbnail" /> </div> </div> </div></div>4) W(—‰•_u(v„W0e¹mûR NåNNãxÿ Nwå•SNÀNHSŸVàŒu( ÿ huandeng.php NãxTÿ kdS: Wß•1y»e‡NömAÿ€Nl¡gRžlÕ‹©[ƒ_ROMÿSê€ýQvvôc¥Q™Qe index.php e‡NöQ…•èÿ<?php include(TEMPLATEPATH./huandeng.php); ?>•Ù‘Ì—bgNN* 5) •ê[šNI gallery v„QwOSf>y:eHgœ0 bS_e‡Nöwp-content/themes/your_theme_name/css/jd.gallery.cssÿW(•Ù‘ÌOîe9 gallery v„[½TŒšØ0•ÇOîe9 jd.gallery.css [ŒQh[ù•ÙN*slideshow h9cn•ê]ñv„N;˜˜•ÛˆLN*`S0 ÿ ^_^ÿ#myGallery, #myGallerySet, #flickrGallery{width: 590px;height: 250px;z-index:5;border: 1px solid #000;}žØ‹¤v„[WS÷[ùNŽN-e‡Y*N†ÿSïNåŒet slideshow Ne¹Oá`ohv„šØ^¦SÊe‡[Wv„[WS÷ÿSê—‰•Oîe9.jdGallery .slideInfoZoneÿnÑR¨Oá`ohšØ^¦0˜œ‚r{ISÂepÿ.jdGallery .slideInfoZone h2ÿOá`ohQ…h˜˜h7_ÿ------------------------------------------------{, 21 ˜u /Qq60 ˜u -------------------------------------------------
  • 22. .jdGallery .slideInfoZone pÿOá`ohe‡g,h7_ÿ *NnÑR¨h[½^¦ ; .jdGallery .carousel { position: absolute; width: 100%; margin: 0px; left: 0; top: 0; height: 90px;/*NnÑR¨h[½^¦ ;*/ background: #333; color: #fff; text-indent: 0; overflow: hidden; } O`•ØSïNåOîe9wp-content/themes/your_theme_name/scripts/jd.gallery.js gee9SØgallery v„ Uy:eHgœÿSmooth Gallery cÐO›N†YyÍNTv„f>y:eHgœÿO`SïNåh9cn—‰••ÛˆLOîe9ÿ 5 N*O`Nwå•Sv„ Wordpress Qýep . 1 wa )(m pi _ l Wúg,Nf/NN*•…~§{€SUv„QýepÿQA‹¸O`••ÇNN›{€SUv„Nãx•{g~ W0TNûOUNºSÑ•u5[P•®Nö0O‹Y‚ÿ < ?p hp @$ u=tl ex sep ra o c m ;e . ; ofyH e mle c gol=ts m $ rl u !b b j yieab-otCg omm u $e u lsoy t ihe n ig- m ! l e g c k = a s $esopla m$,$l$a ,e wm ab (m sut=ii ;)j _ g t c ; m)m Yo$a !b lfi e sc (i o n e u h tg a s rh ne; nyteegahee .gr ase w cl a Pun ah a sas To i eyms s mnr e e l od e go r eip rb .l ? > 2 N;˜˜N-f>y: v{_U ”þc¥ . wt:)_ o n pg o ( i l u 3 ÿn . )a er (_ cl u Qe U ^vmK‹Õ[ƒv„~Óg„f/T&kcxn0Y‚gœ”þc¥RM—b•:/:t RL /p t h [ƒSïNå•êR¨mûR ÿ•lcb{&S÷N:kcxnv„ HLTÿ M 4 w( . ÿu po a ) p t •ÙN*Qýepu(ge•lcbcbˆL{&[W{&N2N:< >b h‹°ÿ^vbŠSÌcbˆL{& /r ON:NN*e°v„kµ„=v„_YËÿW(RMNkµR Qe<^vW(e°v„kµ„=R N< p> ÿ / p > 0 ------------------------------------------------{, 22 ˜u /Qq60 ˜u -------------------------------------------------
  • 23. wordpress NN›^8u(Nãxÿf>y:ge°e‡zàl <div id="newpost">l <h2> ge°e‡zà </h2>l <?phpl $previous_posts = get_posts(numberposts=15);l foreach($previous_posts as $post) :l setup_postdata($post); ?>l <li><a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></a></li>l <?php /*?><?php the_content(); ?><?php */?>l <?php endforeach; ?>l </div>l <div id="newcomment">f>y:ge°‹Ä‹ºl <h2>ge°‹Ä‹º </h2>l <div id="newcom">l <?phpl global $wpdb;l $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID,l comment_post_ID, comment_author, comment_date_gmt, comment_approved,l comment_type,comment_author_url,l SUBSTRING(comment_content,1,30) AS com_excerptl FROM $wpdb->commentsl LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID =l $wpdb->posts.ID)l WHERE comment_approved = 1 AND comment_type = ANDl post_password = l ORDER BY comment_date_gmt DESCl LIMIT 10";l $comments = $wpdb->get_results($sql);l $output = $pre_HTML;l $output .= "n<ul>";l foreach ($comments as $comment) { $output .= "n<li>".strip_tags($comment->comment_author) .":" . "<a href="" . get_permalink($comment->ID). "#comment-" . $comment->comment_ID . "" title="on " . $comment->post_title . "">" .strip_tags($comment->com_excerpt) ."</a></li>"; }l $output .= "n</ul>";------------------------------------------------{, 23 ˜u /Qq60 ˜u -------------------------------------------------
  • 24. l $output .= $post_HTML;l echo $output;?>l </div>l </div>f>y:pí‹Äe‡zàl <div id="reping">l <h2> gS×Qslèe‡zà</h2>l <?php $result = $wpdb->get_results("SELECT comment_count,ID,post_title FROM $wpdb->posts ORDER BY comment_count DESC LIMIT 0 , 10");l foreach ($result as $topten) {l $postid = $topten->ID;l $title = $topten->post_title;l $commentcount = $topten->comment_count;l if ($commentcount != 0) { ?>l <li><a href="<?php echo get_permalink($postid); ?>" title="<?php echo $title ?>"><?php echo $title ?></a></li>l <?php } } ?>l </div>Œu(Sê•^” 5 (a 2 G .NåN) rt av r<?php if(function_exists(get_avatar)){ echo get_avatar($comment, 50);} ?>Œu(RMN${Çeå_×ÿT~í 3{Çeå_×Rˆhl <?php query_posts(showposts=2); ?><?php if (have_posts()) : while (have_posts()) : the_post(); ?>l <h2<?php the_title(); ?></h2>l Posted on <?php the_time(F jS, Y) ?> in <?php the_category(, ); ?>l <?php endwhile; endif; ?><!-- google ad script -->l (Google ads here)l <?php query_posts(showposts=3&offset=2); ?>l <?php if (have_posts()) : while (have_posts()) : the_post(); ?>l <h2><?php the_title(); ?></h2>l Posted on <?php the_time(F jS, Y) ?> in <?php the_category(, ); ?>l <?php endwhile; endif; ?>–•g:e‡zàl <div id="rand">l <h2>–•g:e‡zà </h2>l <?phpl $rand_posts = get_posts(numberposts=10&orderby=rand);------------------------------------------------{, 24 ˜u /Qq60 ˜u -------------------------------------------------
  • 25. l foreach( $rand_posts as $post ) : ?> l <!--N—bf/O``ó•ê[šNIv„ Loop--> l <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> l <?php endforeach; ?></div> [‰Qhv„Œu( W e s d p o rcÒNöj!g•Nãx <?php if ( function_exists(’plugin_template_tag_function’) ) : ?> <h2>•èNöh˜˜ </h2> <?php plugin_template_tag_function(); ?> <?php endif; ?> Wordpress ^8u(Nãx‰ã‘Ê ge°e‡zà . 1 Ws ge°e‡zàv„Œu(SïNåO•u(NˆL_ˆ{€SUv„j!g•h{~sh s d e p r o e_ ge ip v c_ w r at e g [žs°. NãxY‚Nÿ (vt? shp e_h ie cg r ap < b tt p ys o p s o , 0> 1?;) f>y: 1 ( 0 {Çge°fôe°e‡zà) b sh e_ v? ip c_ w <r a h p te g =(e m & 0p 2y tb ii= ttt s o lo ps m oa rt t= u f s c ;) > ? T—b•ÙN*Nãxf>y:O`SZ[¢N-ge°v„ 2 0{Çe‡zàÿQvN-oa ‘ÌN;‰•u( m rt•Ù t= u f s c ge•ê[šNI•ÙNýe‡zàRˆhv„f>y:h7_0QwOSv„SÂepTŒO•u(e¹lÕO`SïNåS€[˜e¹v„O• u(‹ôf- sh er w ip v c_ a _t e g 0( m oa rtN_SïNåN‰•ÿžØ‹¤Nå URˆhf>y: t = uf s c L e‡zàh˜˜0) ˆeQE Wv„ •Ç P : )(q s_ te y p ur s o QýepN_€ýŒu(ge°e‡zàRˆhÿ†}q6NãxOkÔ•ƒ YNp¹ÿOFSïNåfôY}v„c§R6 L p ov„f>y:ÿkÔY‚O`SïN勾•nf/T&f>y:dX‰•0QwOS v„O•u(e¹lÕN_SïNågåw[˜e¹v„‹ôf0 –•2:e‡zà g . < p ? h p npo=a =os n ua_ s_ mt $ &e t 0ep d 1stg r ;) p s( o t s b = y r d n : ) t as_h p ncf $s aa s re o $(do tr p s o > ? N—bf/O``ó•ê[šNIv„ > --! < L -- p o>la ;)(ltihhn"<l i> e _?)ma < ttpk<i< ? ?p(=> / >; hh e _fp " pe > ra < it? ep lr ------------------------------------------------{, 25 ˜u /Qq60 ˜u -------------------------------------------------
  • 26. >ho< ?;anp crdh ef? e N—bcÐR0v„ sty ˆeQE: sq o p _r e u Th7SïNåub–•g:e‡zàRˆh0 ge°uYŠ . 3 N—bf/bNKRMW(NN* sd W sp N;˜˜N-NãR0v„ge°uYŠNãxÿ eo rr QwOSN_‹°N_—f/Tê N*N;˜˜N†0‹åNãxvôc¥Œu(epcn^“f>y:NNýge°uYŠ0QvN- M L 0 1I I T –PR6uYŠ f>y:ep‘Ï0~ÿ‚r•èNýRf/kÏgauYŠv„•“Qúh7_0 < h p? wo $lg ; bl da pb ms o l tEN o,ntp,eti_pI,T ctss SC$ Do "D Iw _r me ,_ toC da p Lq sSs El = T D ,vg_oDt d_muon mcntnm om,mc e endhtt_ ctttrm rea c_o po e_ p a, , _ Is m am e ,l_uen ro,c e utot rm hy mm cp a __ et n tA1R_ pSBnm m,Toe oSSon c3,Nt r_ tc e0 In c ec x m e G ) t U( FMn R$m Opt we > m o c - b ds =>nI D.s$ IEep _T> Lm mO oU Ow cttp wn $T mo oN tNd cE Fe (J s- ob pR _s m - b d Ds$ I. w ) tp > s o- b d p A A1eEn N =Wdt DNno em=E otHp e e p v y R c m Dct _ _ m mr a =stp wo ds s r o a p _ OEn RRt Dt e B m g_ _m ed o c S YC a ML 0 1I I T ;" ;)qstu_=n l$ lsr$$t s ewm ( >se tp e g - b d m oc HL _M$ e=;o Tp r t p tu $u mcnrf os$ho cnm $a(ta )t se mcm o e { )>nirts."n". p mp il t$ oge ><= u cse $a rm ht m ot_ cn (m -t u _ t u o.om . "=ha" . ":". mrt fr< Deg e cn $ile >t_ Ip ( ka ne ) - m . "oetit ""omm nl mn-n "= $_ot cI.tm >n#e mc ote ce" .m D-)ogirts .>" . eti_pn mp " l tot cse $a tcn p_ >t_ m ot (e r - m ec x mc $e to >s - m ;"l>. >a" i< /< / } H .; u _$Lp T o tp t$ M s t o u = >ph ?uo ;t$c t u oe ------------------------------------------------{, 26 ˜u /Qq60 ˜u -------------------------------------------------
  • 27. Œu( TAB ˜u{~ƒÜSUÿmûR Y4e‡NöÿR$e-TŒu( s d a h e e‡Nö j<?php if ( is_home() ){ ?><script type="text/javascript" src="<?phpbloginfo(template_url); ?>/tab/easytabs.js"></script><?php } else { ?><script type="text/javascript" src="<?phpbloginfo(template_url); ?>/tab/easytabs1.js"></script><?php } ?>mûR NãxR0 s c h7_e‡NöQ… l <!--tab ˜u{~ css--> l #tab{ l text-align:left; l position:relative; l } l .menu { l background-color:#ececec; l color:#272727; l border-bottom:1px solid #d7d7d7; l height:23px; l width:450px; l vertical-align:middle; l } l .menu ul { l margin:0px; l padding:0px; l list-style:none; l text-align:left; l } l .menu li {display:inline; l line-height:23px;} l l .menu li a {color:#000000; l text-decoration:none; l padding:4px 5px 6px 5px;------------------------------------------------{, 27 ˜u /Qq60 ˜u -------------------------------------------------
  • 28. l border-left:1px solid #ececec; l border-right:1px solid #ececec; l } l .menu li a.tabactive {border-left:1px solid #d7d7d7; l border-right:1px solid #d7d7d7; l background-color:#CCCCCC; l font-weight:bold; l position:relative;} l l #tabcontent1,#tabcontent2,#tabcontent3,#tabcontent4 { l border:1px solid #ececec; l width:450px; l text-align:left; l padding:6px 0px; l font-size:12px; l margin:2px 0 5px 5px; l } l l l #container1 #newcomment,#container #newcomment{ l l position: relative; l margin-left:30px; l width:350px; l } l l #container1 #reping,#tabcontent1 #reping{ l position: relative; l margin-left:30px; l width:350px; l } l l #container1 #rand li, #tabcontent2 #rand li{ l margin-left:30px; l padding:0; l } l l <!--tab ˜u{~ css-->mûR aNãxR0—‰•Œu(v„W0e¹ bt <div id="tab"><h2>ge°Qslèeå_×SÊ‹Ä‹º </h2><!--Start of the Tabmenu 1 -->------------------------------------------------{, 28 ˜u /Qq60 ˜u -------------------------------------------------
  • 29. <div class="menu"> <ul> <li><a href="#" onmouseover="easytabs(1, 1);" onfocus="easytabs(1, 1);" onclick="return false;" title="" id="tablink1">ge°‹Ä‹º </a></li> <li><a2 ,1a";)2 ,1ar ";) href="#"no b ob o (n e s u c ao = tf y s" m s (o e u a= s te y" v >a"i "ltit "slfnr"io>l> nb e e ucn i a glt = ;artk c < 2d " kS×Qslèe‡zà< "i = el / =";)3 ,1a";)3 ,1#>< b o"sal o (n s e u c a= o s tf y " noi m< ar = b (o s e u a= e tv y "f h >a"i:e‡zà<eio nb "ltit >anr" n –lt e "s>uc c 3 d " i;lf r= k•g = e<tk l "i = / >/ u l< >/ v< d i >1ba-< -- TtS! ar- et n tt o cn >niv 1d < "c d e" i a b n o tt= nme dv"n e <t =m wd "c> ioi < ? p h p $b wl p o d ;g al omStoI cont"LqT mtl ED _o iEI, pr =$ a_ _C w p s, C t,I S d s D tT e Nl D om_ cDnn moa ome ccat, mm oed _,o ,_v Iep ht pr tu g r n sd t omume cctSSm mmc,e Sl_Io _ oen) n UT3 c ,BA, o pu0 n ynGtt eh 1 _R ta( rN _ oe t FepmTId o_wE R cO>LnEb m$bOJp R dF O pcs N tr o T $o c- t s x me w M U> N - t s $cH_= wmp_ (dcpea W>oo podsv >IEtm o)sIne b$n p me d -w n DD t .R r =mb o c tE - s m OcmoAm RRta Ne DDC c1t oes oyn mm me E_tr =_ BE D Ye p gd t A = d a _ np N S wo D erTLtt ;)$twm aMu s$=sI h=p qe ;0 o ;$ lss M c o (u 1 rp u $ e e _ $ H f _n lp T ot c" >L r- I m d gb e t =$me . pan o{st cstn um me $) o t$ (c u t o . "=a.$mhn" "e" c:ctm< fr oio)>l h a>sri < me_ g"na ( mu pr.." s- o " e _ n t t $.ctm omt-t cckra m(D "#eItn om >_e "n> op $.e ml -n "-) g i_ en .>" .e.cmtit " l$_l tm= oon i">t t" np o - t s e _M} ;"i$"cp HL >cmr $. ;o oio_ p p a>t o $ lm)e = u >.e t u prn s tt gm T ( tc s-s <x _ / t ?$d >tv< ;pi/ u e o h c u > o t >/ v< d i ------------------------------------------------{, 29 ˜u /Qq60 ˜u -------------------------------------------------
  • 30. > teTtrS< -2nb a--! - o t ta nc >ebt"v "nc= d 2od < tn i i ta >e"v "p i gd d nri < i= FMttpLm_=tls$? Rlti_oEnr$ ur< O sI(oe w ep e Dus > h SCetd En g ",s_ e ,ot b m - cu p tl T c ;)O$oe "R0It 0D_ 1swn ,to E B M> m L sc p R S c Y C Im - b d pT t n u {)o s tu$ho n$a lsr(crf et e a t p e Do=it$ >p d p Iet o ; t$ s - n ;co=tc;lti_oo=lti$ m$on ttsp e t >p m >t$ ote $t p t -t o - nn c e n tm n u u e o m ec _ > 0!otei ?{)=mf c $n tm n u o (copl ? )i pirtopr>lh<tit>;dt$mh<ha<ch " o lgch <e= ? " e s _ee= i (a f ke " np ? e >l>elti$c>eti$ i < th<l t a op /? eh > ? < " / > }? ?} < h p >/ v< i d >/ v< i d >2nT-! -- to-< ec tb na E d n > teTtrS< -3nb a--! - o t ta nc >ebt"v "nc= d 3od < tn i i ta >dv "r i di d n" < a= < h p ? ;)n1mstog stn a&b _ _ d0n( st= d =rr e o yoe p p btu rsp ro e ds s$ ar >: ) tssstn ho ? $a d (ef o pa p _ cr s$ o ar N—bf/O``ó•ê[šNIv„e>< --! < <hal h>i pr-- =< ?L "o fp >l> ;)(lti_>;)nrt i < e tt< kl a /< hp (m > e h i_ ? / " p ? e a h >hrnp ?;ao< cdh ef? e >/ v< i d >bd /<i< >b/ rv /< >r ------------------------------------------------{, 30 ˜u /Qq60 ˜u -------------------------------------------------
  • 31. >/ v< i dOÝ[Xsj NãxR0vî_UN /* EASY TABS 1.2 Produced and Copyright by Koller Juergen www.kollermedia.at | www.austria-media.at Need Help? http:/www.kollermedia.at/archive/2007/07/10/easy-tabs-12-now-with-autochange You can use this Script for private and commercial Projects, but just leave the two credit lines, thank you.*/ //EASY TABS 1.2 - MENU SETTINGS //Set the id names of your tablink (without a number at the end)‹¾•n”þc¥v„ tab ˜u{~Tyð var tablink_idname = new Array("tablink") //Set the id name of your tabcontentarea (without a number at the end)‹¾•n tab Q…[¹S:Wß Tyð id var tabcontent_idname = new Array("tabcontent") //Set the number of your tabs//‹¾•n tab v„N*ep var tabcount = new Array("2") //Set the Tab wich should load at start (In this Example:Tab 2 visible on load) var loadtabs = new Array("1") //Set the Number of the Menu which should autochange (if you dontt want to have a change menu set it to 0) var autochangemenu = 0; //the speed in seconds when the tabs should change var changespeed = 3; //should the autochange stop if the user hover over a tab from the autochangemenu? 0=no 1=yes var stoponhover = 0; //END MENU SETTINGS------------------------------------------------{, 31 ˜u /Qq60 ˜u -------------------------------------------------
  • 32. /*Swich EasyTabs Functions - no need to edit something here*/ function easytabs(menunr, active) {if (menunr == autochangemenu){currenttab=active;}if ((menunr == autochangemenu)&&(stoponhover==1)) {stop_autochange()} else if ((menunr == autochangemenu)&&(stoponhover==0)) {counter=0;}menunr = menunr-1;for (i=1; i <= tabcount[menunr]; i++){document.getElementById(tablink_idname[menunr]+i).className=tab+i;document.getEleme ntById(tabcontent_idname[menunr]+i).style.display = none;}document.getElementById(tablink_idname[menunr]+active).className=tab+active+ tabactive;document.getElementById(tabcontent_idname[menunr]+active).style.display = block;}var timer; counter=0; var totaltabs=tabcount[autochangemenu-1];var currenttab=loadtabs[autochangemenu-1];function start_autochange(){counter=counter+1;timer=setTimeout("start_autochange()",1000);if (counter == changespeed+1) {currenttab++;if (currenttab>totaltabs) {currenttab=1}easytabs(autochangemenu,currenttab);restart_autochange();}}function restart_autochange(){clearTimeout(timer);counter=0;start_autochange();}function stop_autochange(){clearTimeout(timer);counter=0;} window.onload=function(){ var menucount=loadtabs.length; var a = 0; var b = 1; do {easytabs(b, loadtabs[a]); a++; b++;}while (b<=menucount); if (autochangemenu!=0){start_autochange();} }b@g˜u—bv„_Rhcÿfunction BX_archive(){ global $month, $wpdb; $now = current_time(mysql); $arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS year,MONTH(post_date) AS month, count(ID) as posts FROM " . $wpdb->posts . " WHERE post_date <" .$now . " AND post_status=publish AND post_type=post AND post_password= GROUP BYYEAR(post_date), MONTH(post_date) ORDER BY post_date DESC"); if ($arcresults) { foreach ($arcresults as $arcresult) { $url = get_month_link($arcresult->year, $arcresult->month);------------------------------------------------{, 32 ˜u /Qq60 ˜u -------------------------------------------------
  • 33. $text = sprintf(%s %d, $month[zeroise($arcresult->month,2)], $arcresult->year); echo get_archives_link($url, $text, ,<h3>,</h3>); $thismonth = zeroise($arcresult->month,2); $thisyear = $arcresult->year; $arcresults2 = $wpdb->get_results("SELECT ID, post_date, post_title, comment_statusFROM " . $wpdb->posts . " WHERE post_date LIKE $thisyear-$thismonth-% AND post_status=publishAND post_type=post AND post_password= ORDER BY post_date DESC"); if ($arcresults2) { echo "<ul class="postspermonth">n"; foreach ($arcresults2 as $arcresult2) { if ($arcresult2->post_date != 0000-00-00 00:00:00) { $url = get_permalink($arcresult2->ID); $arc_title = $arcresult2->post_title; if ($arc_title) $text = strip_tags($arc_title); else $text = $arcresult2->ID; echo "<li>".get_archives_link($url, $text, ); $comments = mysql_query("SELECT * FROM " . $wpdb->comments . "WHERE comment_approved=1 and comment_post_ID=" . $arcresult2->ID); $comments_count = mysql_num_rows($comments); if ($arcresult2->comment_status == "open" OR $comments_count > 0)echo &nbsp;(.$comments_count.); echo "</li>n"; } } echo "</ul>n"; } } }}------------------------------------------------{, 33 ˜u /Qq60 ˜u -------------------------------------------------
  • 34. Wordpress N;˜˜N-^8u(Nãx`;~Óÿ.1 W( W N;˜˜N-f>y:gpíe‡zàv„ P Nãx d or e p s r HP <?php $result = $wpdb->get_results("SELECT comment_count,ID,post_title FROM $wpdb->posts ORDER BY comment_count DESC LIMIT 0 , 10"); foreach ($result as $post) { setup_postdata($post); $postid = $post->ID; $title = $post->post_title; $commentcount = $post->comment_count; if ($commentcount != 0) { ?> <li><a href="<?php echo get_permalink($postid); ?>" title="<?php echo $title ?>"> <?php echo $title ?></a> (<?php echo $commentcount ?>)</li> <?php } } ?>2. w N;˜˜ vøQse‡zàNãx o de p r s r <div id="newpost"> <ul> <?php $tags = wp_get_post_tags($post->ID); if ($tags) { $first_tag = $tags[0]->term_id; $args=array( tag__in => array($first_tag), post__not_in => array($post->ID), showposts=>10, caller_get_posts=>1 ); $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?> </a> </li> <?php endwhile; } else {echo not realate post;} }else {echo not realate post;} ?> ------------------------------------------------{, 34 ˜u /Qq60 ˜u -------------------------------------------------
  • 35. .3 W N;˜˜O•u( P Nãx•“Qúge°e‡zà o de p r s r HP <?php $limit = get_option(posts_per_page); $paged = (get_query_var(paged)) ? get_query_var(paged) : 1; query_posts(showposts= . $limit=7 . &paged= . $paged); $wp_query->is_archive = true; $wp_query->is_home = false; ?> <?php while(have_posts()) : the_post(); if(!($first_post == $post->ID)) : ?> <ul> <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></li> </ul> <?php endif; endwhile; ?>4. ge°‹Ä‹ºÿ <p ? p h $a w; o b g plb d p,sCT _$i_ oqD pllrS sLo aoT twN S,pI sdtC "EI, et s =D Et cmmtore,t o Dcom_ m_ ose n c m_ d o _cu _ e e nt mD a a , nt m It p h g n _otm , I ,m cmr, mm o _e y e meo c _ ad p ,u nmo n p ea tv _ h o t o p nt c m_, u t lr SSIcSnepmFE UTomtr d m R BGcot > Lt N 3te c O RA)cc b ET m1O o e ( onw- s 0_ n mM T _p ex U ,R F$ , e Jpspmemdt OOd m $It-s $d$b o e> Nb(> c wo w-Nc s _Is I>wo mD. p - n =) s .t n o t p _ o tb D psp WRm"strY HENepB Eccpy ooo_ A1nn Asto D"d mw _= Ord Nv DR m R pE aa te = o p D cmEI o _ t;I me S dM n1 _0 aC tL gT D" m $ mr c $n owu m$- ;)(b =e se et pl q d t l_ > g s $uL eM pt ; _ = rT H$ o p $ m{)t c $tm ea n oc e ao (s rm cs me f n h _"hn<o ga.>""p pl"I-ti-t$ e#)."e.t mfenu $=m nc>n ti D l= cm .m ro ke o< (m " r a $lticD cmm o >"._ " o"e e tt It n- n me =n m as$.m pt"cl>h $>oa.u g.""t>r _m <) c > "-s s -t /ia tr e p o .e _ i ne ( mn m o tt asic.e pt>o_ $ .>/ x gm )r _"-t c c ;e p s :<e tr l" t o" i n ( m m } $.TL po; =p _M ou H st t$ et c $ h op ; u ? > ------------------------------------------------{, 35 ˜u /Qq60 ˜u -------------------------------------------------
  • 36. .5 w N;˜˜ vøQse‡zàNãx o de p r s r Wúg,sql f/•Ùh7ÿ $sql = “SELECT p.ID, p.post_title, p.post_date, p.comment_count, count(t_r.object_id) as cnt FROM $wpdb->term_taxonomy t_t, $wpdb->term_relationships t_r, $wpdb->posts p WHERE t_t.taxonomy =’post_tag’ AND t_t.term_taxonomy_id = t_r.term_taxonomy_id AND t_r.object_id = p.ID AND (t_t.term_id IN ($taglist)) AND p.ID != $post->ID AND p.post_status = ‘publish’ GROUP BY t_r.object_id ORDER BY cnt DESC, p.post_date_gmt DESC LIMIT $limit;”; Np¹Np¹v„‰ã‘Êÿ term_taxonomy 0 term_relationship0 posts •ÙN_ ˆh[Xv„NÀNHbNY‹ôÿ •QNN‚,•ýSïNågåR0ÿ~ôWúv~yÑŒŒO<•ýg0bŠNÖNì•Þ•wgeÿPZN* sqlÿlèa group by NåSÊ limitÿ•Ùh71SïNåcÐSÖ~ÓgœN† $related_post = $wpdb->get_results($sql); NKRM‰•bŠ $taglist PZY}ÿR)u( wp_get_post_tags($post->ID);SïNå‹å{Çe‡zàv„v„ tag SÖR0 NN*ep~ÄN-ÿq6TQ•”þc¥1SïNåN† gT`NHYt•“Qú1wN*Nºr1Y}N†ÿ N*RŸ€ýbQ™v„Yi‚N_1SAQàˆLÿ kÔ•ƒUœk"{€wív„‹ôÿ •Ù b TuTu0 function related_post($limit = 10) { global $wpdb, $post; $tags = wp_get_post_tags($post->ID); $taglist = "" . $tags[0]->term_id. “‘”; $tagcount = count($tags); if ($tagcount > 1) { for ($i = 1; $i < $tagcount; $i++) { $taglist .= “, ‘”.$tags[$i]->term_id.”‘”; } } $sql = “SELECT p.ID, p.post_title, p.post_date, p.comment_count, count(t_r.object_id) as cnt FROM $wpdb->term_taxonomy t_t, $wpdb->term_relationships t_r, $wpdb->posts p WHERE t_t.taxonomy =’post_tag’ AND t_t.term_taxonomy_id = t_r.term_taxonomy_id AND t_r.object_id = p.ID AND (t_t.term_id IN ($taglist)) AND p.ID != $post->ID AND p.post_status = ‘publish’ GROUP BY t_r.object_id ORDER BY cnt DESC, p.post_date_gmt DESC LIMIT $limit;”; $related_post = $wpdb->get_results($sql); $output = “”; foreach ($related_post as $tmp){ $output .= •ÙN*1wN*Nºr1Y}N† } if($output == “”)$output = “No Related Post Yet”; echo $output; } ------------------------------------------------{, 36 ˜u /Qq60 ˜u -------------------------------------------------
  • 37. WordPress {€SUONj!g• ,ON•QzÙ[ŒbQHW( WordPress ubNR|{ÿSë [Wúg,•De™ q6TRR+Q™ ]ÿ [QlSø{€NË [€T|ûe¹ ]TŒ_ ]{IÿQ•XžR R|{ [e°•ûN-_Ã] .™–˜uj!g•‘ÌŒu( query_posts(’p=1′) , [ŒbQlSø{€NËÿ1 f/QlSø{€NË•Ùe‡zà IDindex.php Nãx :<?phpget_header();?><div id=”page” class=”clearfloat”><div class=”clearfloat”><div id=”header”><div class=”mainheader”><a href=”<?php bloginfo(’url’); ?>”><?phpbloginfo(’name’); ?> </a></div><div class=”description”></div></div><ul id=”nav” class=”clearfloat”><li><a href=”<?php bloginfo(’url’); ?>”>HOME</a></li></ul><div id=”content”><br /><img src=”<?php bloginfo(’template_url’); ?>/banner-page.jpg” border=0alt=”Banner” /><?php global $firstx; ?><?php $firstx=0;?><?php if ( is_home()) { ?><?php $firstx=1;?><?php query_posts(’p=1′); ?><?php } ?><?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?><div class=”post” id=”post-<?php the_ID(); ?>”><div class=singlepage><a href=”<?php the_permalink() ?>”rel=”bookmark”><?php the_title(); ?></a></div>------------------------------------------------{, 37 ˜u /Qq60 ˜u -------------------------------------------------
  • 38. <div class=”entry”><?php the_content(); ?><?php// get_the_title()// get_the_content()// $ss=get_the_content();// echo “<p> ********************<p>”;// echo $ss;// echo “<p>*********************<p>”;?><!–yes kao–></div></div><?php endwhile; else: ?><p><?php _e(’No Data’); ?></p><?php endif; ?><p></div><?php get_sidebar(); ?></div><?php get_footer(); ?>W(sibebar.php Q™k{N†•èR[ü‚*ÿ Qv[žSïNåu(Qv[ƒe¹_v„ÿ NåNf/ sibebar.phpv„Nãx :<div id=”sidebar”><div class=”sideblock”><h3>[ü‚* </h3><ul><li><a href=’<?php bloginfo(’url’); ?>’>™–˜u </a></li><?php wp_list_cats (’include=3′); ?></ul><br /></div><div class=”sideblock”>------------------------------------------------{, 38 ˜u /Qq60 ˜u -------------------------------------------------
  • 39. <h3>e°•ûN-_Ã</h3><ul><?php query_posts(’cat=3&showposts=5′); ?><?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?><li><a href=”<?php the_permalink() ?>”><?php the_title(); ?></a></li><?php endwhile; else: ?><li><?php _e(’No Data’); ?></li><?php endif; ?></ul><br /></div><?php global $firstx; ?><?php if ($firstx==1){ ?><div class=”sideblock”><h3>€T|ûbNì </h3><ul><?php query_posts(’p=12′); ?><?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?><?php the_content(); ?><?php endwhile; else: ?><li><?php _e(’No Data’); ?></li><?php endif; ?></ul><br /></div><?php } ?></div>------------------------------------------------{, 39 ˜u /Qq60 ˜u -------------------------------------------------
  • 40. WordPress d-^úON•QzÙ WordPress N;˜˜j!g•v„Bk!g¶g„gN[šv„N†‰ã0{€SUNË~ÍY‚VþÿW(w‹åe‡hcNKRM—‰•[ùfô‹æ~Æv„ ordPress N;˜˜j!g•v„~Óg„Bk!‹÷‰Áÿ W wordpress N;˜˜~Óg„Bk!VþNÿ WordPress d-^úN-ON•QzÙ`•ïWordPress f/WúNŽe‡zàv„SZ[¢z^•ÿ€ONbN§TÁ•QzÙN_f/WúNŽN{Ç{Çv„e‡zàÿb@Nåu(WordPress d-^úON•QzÙf/SïˆLv„0u( WordPress ^úN-ONzÙj!g•v„`•ïY‚Nÿ1) YR|{ +[PR|{ÿ™–QHÿh9cn—lBfxnON•QzÙv„etOS~Óg„ÿ—‰•QàY|{v„Q…[¹ÿY‚RN: 1 N§TÁNË~Íÿ b€g/ 2N-_Ãÿ 3 QsNŽbNìÿ 4 ‹Õu(•-Npÿ•ÙN›Q…[¹SïNåe>W(•QzÙv„N;ƒÜSUN0q6Tÿ~ÆSON•QzÙ~Óg„ÿeâfxn[PR|{ÿY‚ÿ------------------------------------------------{, 40 ˜u /Qq60 ˜u -------------------------------------------------
  • 41. u1NVþSïNånfpv„N†‰ã•QzÙv„~Óg„ÿNVþN- ˆhy:‹åe‡zàR|{v„ id S÷ÿVàN:WordPress g,Ž«gNN*g*R|{TŒ”þc¥S`u(R|{v„ 10 2 N$N*id S÷ÿbNìSê€ýNÎ 3 _YËÿVþN- id N: 30 40 50 6 v„QàN*R|{N:YR|{ÿ€ 70 80 90 10 N: 3 v„[PR|{ÿQvNÖr6[PR|{Qs|ûN_Y‚kd0[PR|{SïON:•QzÙQ…˜uv„ side ‘Ìv„Q…[¹0P<_—NcÐv„f/ÿ ˆhy:e‡zàÿ“QsNŽQlSø “€T|ûbNì ”0 “TOOO4 ”NN*e‡zàf/vôc¥^NŽYR|{ 5ÿ•ÙN*•QzÙv„ “QsNŽbNì” ”0Q…˜uside ‘ÌeâgR|{SÈge‡zàÿY‚OU‰ãQ³ÿN•¹OgNË~Í0s°W(etOSv„Y`•ï^”‹å_ˆfxnN†1f/ YR|{ +[PR|{02) ‹©kÏN*YR|{Q…˜uv„ side ‘Ìf>y:[PR|{ÿY‚Vþÿ•Ùf/bN쉕v„eHgœ ÿ VàN:bNìkÏN*YR|{N—b•ý‰•f>y:T•êv„[PR|{ ÿ b@NåW(sidebar.php ‘Ìv„R|{RˆhSêQ™ <?php wp_list_cats(’child_of=5′); ?> ]ò~ÏN€ýnᕳbNì v„—lB0Vàkd—‰•Q™NN*if R$e-‹íSåÿ•ÙN* if ‹íSå^.bNì‰ãQ³N†W(kÏN*YR|{N—bŒu(QvT•ê[PR|{0<?php $post = $wp_query->post; if ( in_category(’ 3 ‘)|in_category(’7′)|in_category(’ 8 ‘) |in_category(’ 9 ‘)|in_category(’ 10‘)) <! — Y‚gœe‡zà^NŽYR|{ 3 SÊQvb@g[PR|{ 70 80 90 10 eö–> { wp_list_cats(’child_of= 3 ‘);} <! — Rf>y:R|{ 3 v„[PR|{ –> elseif ( in_category(’ 4 ‘) |in_category(’ 11 ‘)|in_category(’ 12 ‘) |in_category(’ 13‘)|in_category(’ 14 ‘)) { wp_list_cats(’child_of= 4 ‘);} elseif ( in_category( 5 ‘)| in_category(’1 5 ‘)|in_category(’1 6 ‘)) { wp_list_cats(’child_of= 5 ‘);}------------------------------------------------{, 41 ˜u /Qq60 ˜u -------------------------------------------------
  • 42. elseif ( in_category(’ 6 ‘)) { wp_list_cats(’child_of= 6 ‘);}?>OFN—bbNìb@cÐR0v„ “QsNŽbNì”v„ side ‘Ìf/ “e‡zà+[PR|{ ”v„Rˆhÿb@NåNåNNãxN_N€ý[ŒQhnᕳÿ—‰•W( { wp_list_cats(’child_of= 5 ‘);} ‘ÌR Qe]òSÑe‡zàv„—Y`”þc¥0Y‚Nÿ{?><li><a href=”<?php bloginfo(’url’); ?>/about/company/” title=”QsNŽQlSø ”>QsNŽQlSø </a></li><li><a href=”<?php bloginfo(’url’); ?>/about/contact/” title=”€T|ûbNì ”>€T|ûbNì </a></li><li><a href=”<?php bloginfo(’url’); ?>/about/partner/” title=”TOOO4 ”>TOOO4 </a></li><?wp_list_cats(’child_of= 5 ‘);} s°W(side ‘Ì “e‡zà+[PR|{ ”v„RˆhÿbNì_ˆY}v„‰ãQ³N†0u1kdT/SÑÿ_SbNìW(p¹QûTYR|{ N side RˆhNN[š•ýu(R|{ÿVàN:Y‚gœf/R|{v„‹ÝÿS󕹌u(v„f/ category .phpÿ f>y: R|{˜u0Y‚gœkÏN*YR|{N•ýf/•Ùh7f>y:R|{Rˆhv„‹Ýÿw•wge•Øf/_ˆPÏ blogÿNPÏON•QzÙ0b@NåbNìv„•QzÙg„g¶‰•e9NNN†ÿY‚Vþÿ kcY‚VþN-b@y:gN$yÍe¹lÕ[žs°ÿ Nf/Q™N{Ç‹å[PR|{i‚•ðv„e‡zàÿ e‡zà‘ÌgQvNÖ‹å[PR|{v„ ”þc¥ÿbŠi‚•ðe‡zàv„”þc¥u(RbMb@•ðv„e¹lÕQ™W( sidebar.php ‘ÌÿSæYNyÍf/Q™NN*[PR|{ i‚•ð page ˜u—bbŠ”þc¥Q™W( sidebar ‘Ì0•Ù‘ÌbNì‘ÇSÖ{,NyÍe¹lÕ0VàN:u( page v„‹ÝO[ü•ô˜u—b•ÇYNY}{¡tÿ€N page v„ url W0W@N:ÿ http://WßT/˜u—b•)ueT / v„~Óg„ÿ•Ùh71NY}‹ÆR+f/TêN*R|{v„Q…[¹N†0e9[Œv„NãxY‚Nÿ<ul >------------------------------------------------{, 42 ˜u /Qq60 ˜u -------------------------------------------------
  • 43. <?php $post = $wp_query->post;if (in_category(’ 3 ‘)|in_category(’7′)|in_category(’ 8 ‘) |in_category(’ 9 ‘)|in_category(’ 10‘)) { ?> <li><a href=”<?php bloginfo(’url’); ?>/products/products-all/production/” title=”N§TÁi‚bì ”>N§TÁi‚bì </a></li> <li><a href=”<?php bloginfo(’url’); ?>/products/features/functions-and-features/” title=”RŸ€ýryp¹”>RŸ€ýryp¹</a></li> <li><a href=”<?php bloginfo(’url’); ?>/products/strength/strength/” title=”h8_ÃOR¿ ”>h8_ÃOR¿ </a></li> <li><a href=”<?php bloginfo(’url’); ?>/products/application/report-appdeployment/”title=”•è•rN•Ðu(_SÑ ”>•è•rN•Ðu(_SÑ </a></li> <? } elseif (in_category(’4′)|in_category(’1 1 ‘)|in_category(’1 2 ‘)|in_category(’ 13‘)|in_category(’ 14 ‘)) { wp_list_cats(’child_of=4′);} / * ‹åR|{f/ “b€g/N-_Ôÿ—‰•[ƒN:[PR|{ÿ1vôc¥Œu(Qv[PR|{ */ ?> elseif ( in_category(’5′)|in_category(’ 15 ‘)|in_category(’1 6 ‘)) { ?> <li><a href=”<?php bloginfo(’url’); ?>/about/company/” title=”QsNŽQlSø ”>QsNŽQlSø</a></li> <li><a href=”<?php bloginfo(’url’); ?>/about/contact/” title=”€T|ûbNì ”>€T|ûbNì</a></li>------------------------------------------------{, 43 ˜u /Qq60 ˜u -------------------------------------------------
  • 44. <li><a href=”<?php bloginfo(’url’); ?>/about/partner/” title=”TOOO4 ”>TOOO4</a></li> <li><a href=”<?php bloginfo(’url’); ?> /about /news/” title=”ONe°•û ”>ONe°•û</a></li> <li><a href=”<?php bloginfo(’url’); ?> /about /cases/” title=”bRŸhHO‹>bRŸhHO‹ ”</a></li> <? } elseif ( in_category(’6′)) { ?> <li><a href=”<?php bloginfo(’url’); ?>/about/download/” title=”N•}‹Õu( ”>N•}‹Õu(</a></li> <li><a href=”<?php bloginfo(’url’); ?>/about/purchase/” title=”•-NpN§TÁ”>•-NpN§TÁ</a></li> <? }</ul>•ókdÿ sidebar ‘Ìv„[PR|{ÿe‡zàÿRˆh]ò~Ïe9[Œ0c¥w@ÿ—‰•W([PR|{NhN‹åYR|{v„Tyðÿ•ÙNp¹bNÍf/‘Çu(N† if ‹íSåQvQ™k{0<h3><?phpif ( in_category(’ 3 ‘)|in_category(’7′)|in_category(’ 8 ‘) |in_category(’ 9 ‘)|in_category(’ 10‘) ) { ?>N§TÁNË~Í <?php } elseif ( (in_category(’4′)|in_category(’1 1 ‘)|in_category(’1 2 ‘)|in_category(’ 13‘)|in_category(’ 14 ‘) ) { ?>b€g/N-_Ã<?php } elseif ( in_category(’5′)|in_category(’ 15 ‘)|in_category(’1 6 ‘) ) { ?>QsNŽbNì<?php }------------------------------------------------{, 44 ˜u /Qq60 ˜u -------------------------------------------------
  • 45. elseif ( in_category(’6′)) { ?>‹Õu(•-Np <?php }?></h3> •ókdÿ sidebar ‘Ìv„ title TyðN_Q™[ŒN†0 sidebar ‘Ìv„[PR|{ ÿe‡zàÿj!WWQ…[¹N_Qh•ý[ŒbÿY‚‚å—‰•SïW(N—bQ•Q™p¹píp¹”þc¥NK|{v„Q…[¹0 gTÿ single.php0 category.php0 archive.php (ON•QzÙ[ƒv„u(YNY )0 index.php {I•ýSïNåŒu(‹å sidebar.php N†03) ƒÜSUŒu(YR|{Sidebar PZY}N†ÿN—b1‹©ƒÜSUNf>y:Œu(v„YR|{ÿŒu(<?php wp_list_cats(’include=3,4,5,6′); ?> •ÙSåQýepSsSï0include=IDÿf/bNìŒu(v„Y|{ÿYN*Y|{v„ ID S÷u(‚ñe‡“,”–”_04) Oîe9category.phps°W(ƒÜSUNRQúv„f/YR|{Œu(ÿ h7kÏN*YR|{N—b1•ýOf>y:R|{Rˆhÿ •Ù OFY‚gœs°W(gv„YR|{N`óf>y:R|{Rˆhÿ€f>y:‹åR|{v„{,N{Çe‡zàÿ1—‰•geOîe9 category.php e‡NöN†0`•ïTŒOîe9 sidebar ]îNY0gR category.php v„~Óg„^”‹åY‚Nÿ<?php get_header(); ?><?php get_sidebar(); ?><div id= ” content ” > /*•Ù‘Ìf/Œu(R|{v„Q…[¹ */</div><?php get_footer() ?>s°W(VàN:—‰•p¹QûYR|{ 30 50 6 eöÿ ˜u—bNUy:v„f/e‡zà€—^R|{Rˆhÿ b@NåW( <div id= ”content ” ></div>‘ÌmûR NN* if ‹íSåÿ------------------------------------------------{, 45 ˜u /Qq60 ˜u -------------------------------------------------
  • 46. bŠNåRMv„ Ù‘Ìf/Œu(R|{v„Q…[¹ /*• */ v„N-0€—‰•W(~Óg„N-mûR v„f/YR|{ 30 50 6 N- •ÙNWWv„Q…[¹ÿNãxY‚N<?php query_posts(’ name=production ‘); ?><div class=”post” > <?php while (have_posts()) : the_post(); ?> <h2><a href=”<?php the_permalink() ?>” class=”homesidetext1″ title=”<?php the_title() ?>”> <?php the_title() ?> </a> </h2> <div class=”entry”> <?php the_content(’Read the rest of this entry »’); ?> </div> <?php endwhile;?></div>query_posts ÿÿf/ƒ·SÖe‡zàÿQvQ…SÂepSïu( ’ p=e‡zàID ’ b ’ name=e‡zà•)ueT ’ geŒu(`óe>W(YR|{N™–˜uv„e‡zàÿ<h2></h2>‘Ìf/e‡zàTyðÿthe_content(); f/Œu(e‡zàQ…[¹0•Ùh71SïNåW(ƒÜSUN-RQúv„YR|{Np¹QûÿQúge`ó‰•v„e‡zàbR|{RˆhN†0NåNQàp¹1f/ON~§•QzÙQhzÙu( WordPress d-^úv„Y•ô`•ï0NŒÿlèaN‹˜y10 •Ùh7v„N;˜˜j!g•‰•WúNŽ WordPress v„epcn^“ÿVàN:W(Q™side eöu(R0N†R|{v„ id S÷020 kcf/VàN:{,Ngaÿ•Ùh7v„ WordPress N;˜˜j!g•l¡g•u(v„ÿSê€ýVàON€_030 l8NE”þc¥gY}u( /%category%/%postname%/ ÿR|{ +e‡zà•)ueTÿv„_b_ÿ•Ùh7 urlW0W@Ow•wgefôg~Óg„`ÿw•wgeN_fôPÏONbN§TÁ•QzÙ0------------------------------------------------{, 46 ˜u /Qq60 ˜u -------------------------------------------------
  • 47. R^úoN®v„ Wordpress eågc”® bNwå•Sbv„•£N›eågc”®`NHh7ÿOFO<NNO`Nì•ý_ˆUœk"0f/v„ÿNÊY)ÿbNì ge[fN`Y‚OUN: W sr d sP r o R^úNN*oN®v„eågc”®0`;QqgNke{€SUv„keš¤ÿ e {,Nkeÿ•“QeNãx ÿ‹÷N‰•YR6|˜•4ÿ•“QeR0j!g•N-ÿ a<s sd cp =it> lvt ea - o a<o>_ sdhm cm<< =i n?M lv t h)v it/ p ?> e d h > e ip ( a< >_ sdvtd ciam =y?p lv <( d > h ie < p/e h) v >di/ < N:N†{&T~Óg„h<_ÿW(n•NãxN-^”‹åY‚NVþb@y:ÿ •ÙN›Nãxv„aNI‰ã‘Êÿ adt se cp =a lvt> <s i- o bkcW(^úzËNN*vÒj!W‹b€NN*ˆ«T}T N: e D d V p Bh{~) a ( tv„ I -t os 0_Sq6bN_SïNå[ƒT}TN:ottilp.-la0to e t adtn sm> cph =-o lvs <t io W( mvÒj!W‹N-ÿ^úzËNN*s°[žgNý pn -t ot s o h v„vÒj!W‹0 <e? m> ?M h ) p it( e h _p •Ù‘ÌbO•u(N† pQýep h p m hM i_ e) t( e ÿu(ge Œu(•)Q™v„gNýP<0O‹Y‚ÿQmg Jv„‚ñe‡•)Q™N: J0OFW(bv„eågc”®O‹ u ne U N [PN-ÿ^vl¡gO•u( J Nãfÿ JEÙf/VàN:b^vl¡gŒu(Qýep•)Q™rHg,v„Nãx0 U N Uÿ• N v > d i/ < ~Óg_gNýv„vÒj!W‹0ÿSsQs•í D ‹Ñ€lèÿ V Ih{~- ad > sd cia =y lv < ^úzËeågvÒj!W‹0 ------------------------------------------------{, 47 ˜u /Qq60 ˜u -------------------------------------------------
  • 48. m)< >hp ?_h idt? (t e e O•u( PQýep H P mt )id (_ e t h e ÿu(geŒu(eåg P<ÿOf>y:bN$OMepP<0O‹Y‚ÿ0 3 >/ v< i d ~Óg_eågvÒj!W‹0 >/ v< i d l¡gNûOUQ…[¹SïNåmûR R0bv„eågc”®N-N†ÿb@Nå•Ù‘ÌbN_~Óg_ÿQs •íÿN† edtp t-o as vÒj!W‹ÿb€yð D V Ih{~ÿÿVàN:b_Ř{c˜z^•Qs•íb@gbS_ v„h{~0 ÿfôYQsNŽed v„f>y:•˜yÿ‹÷‹¿•î t a tp n eh . ÿ {,NŒkeÿ^úzË€ÌfoVþrG O`—‰•gÐN›‹¾‹¡|{•oNöu(ge‹¾‹¡O`v„eågc”®v„€ÌfoVþrGÿY‚ Po hp oÿNVþ s h t f/bv„eågc”®€ÌfoVþrGÿ {,NkeÿN:QvR^úh7_ •ÙNke—‰•O`N†‰ãNp¹ C v„wå‹Æÿh7_Q³[šNŽN*Nºv„POY}ÿVàN:O`v„€ÌfoVþhH SS ONbv„NT0OFÿN—bf/N›Wúg,v„Q…[¹ÿ e d {s pa tt - o.;tfl :tf eo al nlia es ;ny i p :i d l 0n ;p: 1g 0a 0r m xi ebtd pan n(etl mi.: ri)ka ;-cp eg o_ afr toe do g n a b le u s m t _ / } VþrGv„Tyð^”‹åT}TN: de ei.tl oa _p a b ft e n tm g u _ 0a mig f/[Xe>VþrGv„e‡Nö es / Y90Y‚gœO`[XP¨O`v„VþrGW(QvNÖe‡NöY9ÿfôe9mia g N:O`v„VþrGe‡NöY90 e s/ R^úR¨`v„•n˜ve‡zà ------------------------------------------------{, 48 ˜u /Qq60 ˜u -------------------------------------------------
  • 49. bNìv„SZ[¢ÿ M P x w o a re ÿ—‰•gÐN›e‡zàkÔQvNÖe‡zàOÝcW(gN—bfô••v„eö•ô0b NìSÑs°bNìd°Q™v„z?NöPÏabab–wQel¼lýÿN€ýTQvNÖv„z?NöS:R_ge0O‹Y‚ÿW( •ÙN*SZ[¢NbNìOQ™QsNŽb@gN‰•v„Q…[¹ÿOF‘Íp¹e>W(bNìv„eňL~ÏšŒ0•î˜˜ge N†ÿbNìY‚OUbM€ýW(™–˜u‘Íp¹f>y:•ÙN›~ÏšŒÿOF^vNO_ýueb@gQvNÖv„z?Nöÿ•Ù f/bNì`óQúv„ÿ mp sd ufNÎsw r hp o l eo s e rr QsNŽY‘Í_ªs¯v„TyÍ‹¨‹ºN-‹©b`óR0NN*O•u(N$k!_ª s¯v„e¹lÕ0NN*u(gegå‹â^vNÅf>y:gÐN*R|{N-v„e‡zà0SæNN*u(geTŒdæ[ûW(b@g R|{N-v„b@gv„e‡zà0{,NN*gå‹âf/NÎ xh e dt oe c N-YR6gev„ÿ_ˆ[¹ft‰ãÿ ;)=oea=r &=W gmwu 1nftcP ep n$ ssr em asg (e py y w y or Q ho _ t_ _ a n q ;)(t_$: ))(t_(eh s>y sy oy oyli pm spr w e _ vq h-r >_ t q eu e a u he m $ - D$eai_ >tp tcd Io u ;s p - = l$ t n _ o d N•ðNãxv„a`f/ÿSØ‘Ï m P<N:gå‹âR|{TN:v„b@ge‡zà y r e u q _ y •K eo grf a pt n v„~Ógœÿ^vNÅ_—R0N{Çe‡zà0Qs•.p¹W(gT•èRÿ~ÙSØ‘Ï_eaid •Ku tcp ld t n _ o P<N:•ÔVÞv„SUrìe‡zàv„ DIP<0bNìW(NNke—‰••ÙN*P<0 N—bNkµNãxf/_ˆ‘͉•_ˆhQÆv„ÿSïNåW(‹¸YN;˜˜N-b~R00[ƒ€ýƒ·SÖb@geå_×ÿ;)(t_ : ))(t_ eh ))(t_ fi st s( o o li: o p sp w sp e h v e a h s( e v a h tpcmkl fusd/ sh rf i / oaoe ft o et a ;n ee lh w di •ÙkµNãxƒ·SÖb@gv„eå_×ÿ^vh9cn/ •VNŽj!g•ÿv„h<_f>y:0 fusˆLÿO• •Ù d ft o / Y‚gœNÅNÅ•Ùh7•Q™Nãxÿ1OSÑuO`b@•v„e‡zàÿ•n˜ve‡zàÿˆ«f>y:N$k!v„`ÅQµ ÿNk!W(•n˜vS:WßÿSæNk!Rf/W(b@gQvNÖe‡zàS:Wßÿ0f>y:•Ùh7^vNY}ÿb@Nå •Ù‘Ì‰•O•u(R0_ eaid QýepN†0 tcu ld pt n _ o mûR R0NN*fiíSåN-–;kbR6[še‡zàf> ‹ y:N$k!0N—bf/Nãxÿ;)(t_ : ))(t_ eh ))(t_ fi st s( o o li: o p sp w sp e h v e a h s( e va h )eai_=t$(fi tcdDp l$- pI s u>o t n _ o d ;io ec ut nn tpcmkl fusd/ sh rf i / oaoe ft o et a ;n ee lh w di NãxN-v„{,NŒN*fiíSåv„a`f/ÿƒ·SÖb@geå_×ÿN_SSÑs°N{Çe‡zàv„ D ‹ IP<N eai_ v„P<vø{IeöN-e-bgˆLÿc tcdld p ut n _ o et un no ‹íSåÿÿT&Rf>y:h9cn/ i o d/ fusˆLv„h<_f>y:b@gQvNÖv„e‡zà0‹°OOÿd •Ù ft eai_ QýepP<b@Nãˆh tcd lo p ut n _ v„e‡zà]ò~ψ«f>y:•ÇN†0 1•Ùh7_SO`bŠb@gQ…[¹e>R0N•w_—R0N†NÀNHÿNN*R¨`v„•n˜ve‡zàÿNghÒv„•è Rf/_S•n˜ve‡zàˆ«e°v„N{ÇNãfÿÿ NKRMv„e‡zàOW(N—bb@ge‡zàv„S:Wßf>y:Qúge ÿSÖQ³NŽO`•béN†Ye‡zàf>y:NåSÊe‡zàv„Sшh˜‘s‡ÿ0 ------------------------------------------------{, 49 ˜u /Qq60 ˜u -------------------------------------------------
  • 50. gå‹â wordpress SZ[¢•De™v„SQL T}Nä gå‹â 2 6 0 ^tb@gv„e‡zàv„ S T}Nä: QL SEOT ECU( LCNT*) F``o Rw O_M ss p t W_E 16tp 00a --d 1E 0et >R Ho 2s =10 et02 A0<_ -7 N 1 d - a tp D s o hpaN s=ttt iuA b_ lssp uD s o gå‹â 2 6 0 ^tb@g‹Ä‹ºv„ S T}Nä: QL SEOT ECU( LCN T* ) FMs Rwm O_`n `e m o pt c W00a H0ee E6t 1-_ Rd mt om - 1n c > 2 E = 10mt 02om 0Nee -7<d 1c_ Aa - Dn t A= N_ me om c1 Dn d p a e v o r2 t gå‹â 2 6 0 kÏ{Çe‡zà^sWG[Wepv„ S T}Nä: QL SEVN_( ECG)eH LALGo T()nt Etcs n o T tp F``o Rw O_M ss p t W_E 16tp 00a --d 1E 0et >R Ho 2s =10 et02 A0<_ -7 N 1 d - a tp D s o hpaN s=ttt iuA b_ lssp uD s o gå‹â 2 6 0 ^te‡zà`;[Wepv„ S T}Nä: QL SEM)eH ECLGo LS (N_( UEnt T )tcs n o T tp F``o Rw O_M ss p t W_E 16tp 00a --d 1E 0et >R Ho 2s =10 et02 A0<_ -7 N 1 d - a tp D s o hpaN s=ttt iuA b_ lssp uD s o ------------------------------------------------{, 50 ˜u /Qq60 ˜u -------------------------------------------------
  • 51. ~ÙWP mûR Ctrl+Enter VÞY_ëcw•. ™–QHf/W(j!rHv„ omèR Nkµ JNãx me c.s ^•• pn ht p S <script type="text/javascript"> document.getElementById("comment").onkeydown = function (moz_ev) { var ev = null; if (window.event){ ev = window.event; }else{ ev = moz_ev; } if (ev != null && ev.ctrlKey && ev.keyCode == 13) { document.getElementById("submit").click(); } } </script> gTf/b~R0•Ùkµÿ^vOîe9ÿ mÐN¤" ans c ut nt<l "t= cps b =ba m eu s "u y ni e ot" p = " i "t" u m b s = diclÐN¤Et= 5b>"elrevxa +Cu "it/ rn"a= t e d n e¹lÕNŒÿ( Nb ) W(.m N-b~R0NåNNãxÿ ht psn m oe c <TEXTAREA id=comment tabIndex=4 name=comment rows=10 cols=105 jQuery1250561977609="48"></TEXTAREA> Oîe9N:ÿ <TEXTAREA id=comment onkeydown="if(event.ctrlKey&&event.keyCode==13){document.getElementById(submit) .click();return false};" tabIndex=4 name=comment rows=10 cols=105></TEXTAREA> `;~ÓÿvøkÔge‹ôÿ{,NŒyÍe¹lÕfô{€SUÿSt[žs°N†vøTv„eHgœ0 —‰•lèav„f/ÿ•Ù‘Ìv„ d iN[š‰•TŒ sj d ‘Ìv„ i P<Nh7Nq6eàlÕYt0 ------------------------------------------------{, 51 ˜u /Qq60 ˜u -------------------------------------------------
  • 52. WordPress v„ 10 N*g@bK~§ Hack b€]ç2008 ^t[ù WordPress ge‹ôf/—^T[û^8v„N^tÿ[ƒv„•oNöYk!fôe°ÿg~ÈOÃb‘ÍYrHg, 2.7 v„SÑ^ÿ‹¸Y•QzÙVàkdN__YËO•u( WordPress •oNö0NN›u(b7W(O•u(•ÇzN-[ù WordPress v„Nãx{ION†‹¸Ye9•ÛÿfôY WordPress u(b7N_VàkdS×vÊ0•Ù{Çe‡zàTY[¶NË~Í 10 N*ge°g[žu(v„ WordPress hackÿ[ƒ€ý‹©O`v„SZ[¢_dÎ_•³šlR›ÿ 1g_ c#••ÿgY–P^¦W0N:O`gR¡0kdYÿkÏN* hack •Ø•ý–DgvøQs‹ôfÿ•Ùh7O`NNÅ€ý‹© WordPress ‘Êe>gYR›‘Ïÿ•Ø€ýwå•SY‚OUdÍO01.SêW(d}"_dÎ~ÓgœN-f>y:AdSense ^•TJ•î˜˜ÿ Ob@ThwåÿN‚,‹¿•î^vNp¹Qû^•TJ0^•TJp¹Qûs‡ 90%f/ge•êd}"_dÎv„f>y:~Ógœ0SæNN*•î˜˜f/ Google v„fz€ý‹¡N÷0fz€ý[šN÷aTsw@ CTR kÔ•ƒONÿp¹Qûs‡SUN÷YbSb˜bc0O‹Y‚ÿY‚gœNk!p¹Qûkc^8ƒ·_— •ŽQCv„‹Ýÿ Google v„fz€ý‹¡N÷SêOf/ 1 0.1 •ŽQC0•Á•÷TÿOFf/ÿNåNv„Nãxe9•Û1€ý‰ãQ³•ÙN*•î˜˜N†0[ƒSêW(d}"_dÎ~ÓgœN-f>y: AdSense ^•TJÿ•ÙaTsw@O`€ý_—R0fôYv„p¹Qûs‡ÿfôšØv„ CTR.‰ãQ³e¹hHÿ 1. bS_N;˜˜N-v„ functions.php e‡Nö0 2. |˜•4•ÛNNãxÿ function scratch99_fromasearchengine(){ $ref = $_SERVER[HTTP_REFERER]; $SE = array(/search?, images.google., web.info.com, search., del.icio.us/search, soso.com, /search/, .yahoo.); foreach ($SE as $source) { if (strpos($ref,$source)!==false) return true; } return false; } 3. bŠNåNNãx|˜•4R0 AdSense ^•TJf>y:OM•nv„vø^”j!g•N-0[ƒSêOW(d}"_dÎ~ÓgœN-f>y:ÿ if (function_exists(scratch99_fromasearchengine)) { if (scratch99_fromasearchengine()) { INSERT YOUR CODE HERE } }------------------------------------------------{, 52 ˜u /Qq60 ˜u -------------------------------------------------
  • 53. Nãx‹ôfÿ •ÙN*e9•ÛNå scratch99_fromasearchengine()Qýep_Y4ÿSbìN†u(gec[šd}"_dÎv„ $SEep~ÄSØ‘Ï0•Ùh7ÿSꉕbŠe°QC} R QeR0ep~ÄN-1€ý•{g~mûR e°v„d}"_dÎ0Y‚gœO•u(d}"_dÎd}"v„‹¿[¢ST+N†$SE ep~ÄSØ‘Ïÿ scratch99_fromasearchengine()c¥w@1O•ÔVÞtrue P<02.••QMW(Y_ªs¯N-Qús°‘ÍYe‡zà•î˜˜ÿ u1NŽ “gB_×W‹ ”N;˜˜v„mAˆLÿs°W(_ˆY WordPressy u(b7W(NÖNìv„™–˜uN•ýO•u(N†YN*_ªs¯ÿVàkdNÖNìN_•ëR—‰•W({,NŒN*_ªs¯N••QMQús°‘ÍYe‡zà0‰ãQ³e¹hH u( ÿO• PHP ep~Ä1€ý•{g~‰ãQ³•ÙN•î˜˜ 1. R^úNN* PHP ep~Äÿ^vbŠ{,NN*_ªs¯v„b@ge‡zà ID e>W(QvN- <h2>Loop n°1</h2> <?php $ids = array(); while (have_posts()) : the_post(); the_title(); ?> <br /> <?php $ids[]= $post->ID; endwhile; ?> 2. [ùNŽ{,NŒN*_ªs¯ÿ u( PHP Qýepin_array()gehÀgå O• $ids ep~ÄN-f/T&ST+N†gÐN*e‡zà Y‚gœ ID0 •ÙN*e‡zà ID l¡gST+W(kdep~ÄN-ÿaTsw@{,NN*_ªs¯N-l¡gkd{Çe‡zàÿ•£NH|û~ß1SïNåf> y:[ƒN†0 <h2>Loop n°2</h2> <?php query_posts("showposts=50"); while (have_posts()) : the_post(); if (!in_array($post->ID, $ids)) { the_title();?> <br /> <?php } endwhile; ?>Nãx‹ôfÿ bgˆL{,NN*_ªs¯eöÿQvN-v„b@ge‡zà ID •ýOˆ«e>R0NN*ep~ÄSØ‘ÏN-0Vàkdÿ{,NŒN*_ªs¯bgˆLeöÿbNìSꉕR0•ÙN*ep~ÄN-hÀgå_SRMv„e‡zà f/T&]òf>y:W({,NN*_ªs¯N-1SïNåN†0 ID------------------------------------------------{, 53 ˜u /Qq60 ˜u -------------------------------------------------
  • 54. 3.u(˜uxNãfÿ “N˜u ”TŒ “N˜u ”•î˜˜ÿ WordPress gžØ‹¤Qýepgef>y:N˜uTŒN˜u˜u—bÿ†}q6•ÙkÔl¡g•ÙN*NÀNHRŸ€ýY}ÿOFf/bNfv}_SÑNºTXN:NÀNHNbŠ˜u—bQ™•Ûh8_ÃNãxTb0_Sq6ÿbNìSïNåu(cÒNögeub˜uxÿOFf/Y‚gœ€ýbŠ˜uxvôc¥cÒQeN;˜˜‚NfôY}ÿÿ‰ãQ³e¹hH ‘ÌO•u( ÿ•Ù WP-PageNavi cÒNöbŠ˜uxvôc¥Q™QeN;˜˜ 1. ™–QHN•} WP-PageNavi cÒNö 2. W(xlvØšqR¨N‰ãS‹cÒNö[Xhcÿ^vbŠ wp-pagenavi.php TŒwp-pagenavi.css e‡NöNO R0N;˜˜ vî_U 3. bS_‰•e>•n˜uxv„e‡NöÿY‚ index.php, categories.php, search.php,{Iÿb~R0NåNNãxÿ ÿ <div class="navigation"> <div class="alignleft"><?php next_posts_link(Previous entries) ?></div> <div class="alignright"><?php previous_posts_link(Next entries) ?></div> </div> u(NåNNãxNãfÿNåNQ…[¹ÿ <?php include(wp-pagenavi.php); if(function_exists(wp_pagenavi)) { wp_pagenavi(); } ?> 4. c¥w@‹÷Oîe9cÒNöe‡Nö0bS_ wp-pagenavi.php e‡Nö^vb~R0NåNNãxÿ61 ˆLÿ ÿ function wp_pagenavi($before = , $after = ) { global $wpdb, $wp_query; Oîe9bÿ function wp_pagenavi($before = , $after = ) { global $wpdb, $wp_query; pagenavi_init(); //Calling the pagenavi_init() function 5. gTÿbN쉕bŠ wp-pagenavi h7_ˆhmûR R0SZ[¢0 bS_ header.php e‡NöÿbŠNåNNãxmûR •ÛS»ÿ <linkrel="stylesheet"href="<?phpechoTEMPLATEPATH./pagenavi.css;?>"type="text/css" media="screen"/>Nãx‹ôfÿ •ÙN*Nãxe9•Ûvôc¥W(N;˜˜e‡NöN-R QemûR N†cÒNöNãx0bNìSæY•ØŒu(N† pagenavi_init()QýepNåO•˜ux€ýYkc^8f>y:0------------------------------------------------{, 54 ˜u /Qq60 ˜u -------------------------------------------------
  • 55. 4.•êR¨ƒ·SÖe‡zàVþPϕÿ O•u(•ê[šNI[Wkµgef>y:TŒeå_×vøQsv„VþPÏVúq6_ˆY}ÿOFf/‹¸Yu(b7`óvôc¥hÀ}"^vO•u(e‡zàg,Ž«]LQev„VþPÏ0‰ãQ³e¹hHÿ •óNÊN:kbÿ•Øl¡g•Ùh7v„cÒNö0P<_—^†^xv„f/ÿNåN_ªs¯^.bNì‰ãQ³•ÙN•î˜˜ÿ[ƒOd}"e‡zàQ…[¹v„VþPÏ^vbŠ[ƒNìf>y:Qúge 1. bŠNåNNãx|˜•4R0N;˜˜e‡NöNûaOM•nÿ <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php $szPostContent = $post->post_content; $szSearchPattern = ~<img [^>]* />~; // Run preg_match_all to grab all the images and save the results in $aPics preg_match_all( $szSearchPattern, $szPostContent, $aPics ); // Check to see if we have at least 1 image $iNumberOfPics = count($aPics[0]); if ( $iNumberOfPics > 0 ) { // Now here you would do whatever you need to do with the images // For this example the images are just displayed for ( $i=0; $i < $iNumberOfPics ; $i++ ) { echo $aPics[0][$i]; }; }; endwhile; endif;?>Nãx‹ôfÿ NåNNãx[ž–ENST+N†NN* WordPress _ªs¯0O•u( PHP TŒkcRˆh•¾_v„U/NS:R+1f/RM€O•êR¨d}"e‡zàQ…[¹N-v„VþPÏ€Nf/NÅNÅf>y:e‡zà0NeæSÑs°VþPÏÿ|û~ß1Of>y:05.R^ú “SÑ•R0 Twitter”c”®•î˜˜ÿ O`f/ Twitter u(b7TÿY‚gœf/ÿvøOáO`N[šN†‰ãTŒgSËW(~¿RN«g•£Q…[¹v„NP•£0•£NHÿN:NÀNHN~ÙO`v„‹û€N_cÐO›NN*g:Oÿ ‹©NÖNìSïNåvôc¥bŠO`v„e‡zà URL SÑ•R0 Twitter Nå~ÙO`^&gefôYmA‘ÏTbÿ‰ãQ³e¹hHÿ N*Nãxe9•Û—^^8{€SU0SꉕR^úNN*^&g status SÂepv„Twitter ”þc¥1SïNåN†0€[ùNŽ •ÙWordPress,vôc¥O•u( the_permalink()Qýep1SSÖe‡zà URL N†ÿ------------------------------------------------{, 55 ˜u /Qq60 ˜u -------------------------------------------------
  • 56. <a href="http://twitter.com/home?status=Currentlyreading<?php the_permalink(); ?>"title="ClicktosendthispagetoTwitter!" target="_blank">ShareonTwitter</a>—^^8{€SUÿ[ùTÿOF[ƒTeöN_—^^8[žu(ÿ6. O•u(vô_S÷ÿ••QM_/_S÷•î˜˜ÿ Y‚gœO`~Ï^8W(•ê]ñv„•QzÙNSÑ^NãxrGkµv„‹ÝÿSï€ýO~Ï^8x°N•Ù|{•î˜˜ÿgÐu(b7O‹ôO`SÑ^v„NãxN•wOu(0•Ùf/N:NÀNHTbÿ WordPress žØ‹¤`ÅQµNOvô_S÷•lN: “smart _S÷ÿ ”€T€Ob*e-NãxrGkµ0‰ãQ³e¹hHÿ QMQús°•ÙN›_/_S÷ÿ‹÷cNåNdÍOÿ ‰•• 1. bS_N;˜˜N-v„ functions.php e‡Nö0Y‚gœN[XW(‹åe‡Növ„‹Ýÿ‹÷•êˆLR^úNN*0 2. |˜•4•ÛY‚NNãxÿ <?php remove_filter(the_content, wptexturize); ?> 3. OÝ[Xe‡Nö0YRŸTJbÿNãx‹ôfÿ wptexturize()QýepO•êR¨vô_S÷•lN: smart _S÷0€••ÇO•u( remove_filter()QýepÿbNìOTJwåWordPress N‰•[ùeå_×Q…[¹O•u( wptexturize()Qýepÿ•î˜˜•êq6_—R0‰ãQ³07. Y‚eà Referrer ‹÷lBRy•kbSшh‹Ä‹º•î˜˜ÿ WƒW>‹Ä‹ºf/‹©b@gSZN;•ýY4u¼v„•î˜˜0={¡ Akismet €ýY^.O`^”NØ•ÙN›•î˜˜ÿOFY‚gœ€ýSˆ«R¨N:N;R¨‚Nf/fôY}ÿNåN~ÙQúv„NãxW( wp-comments-post.php ˆ«‹¿•îeöÿOgåb~ referrerÿSs URLgen•˜u—bÿ0Y‚gœkdeö[XW(NN* referrerÿNN:O`SZ[¢v„ URLÿ•£NH1SïNåSшh‹Ä‹º0SÍNKÿ˜u—bOPkb•}Qeÿ€‹Ä‹ºN_1eàlÕSшhN†0‰ãQ³e¹hHÿ ^”u(kd hack v„‹Ýÿvôc¥NåNNãx|˜•4R0Y‰ÂN;˜˜v„ ‰• function.php e‡NöN-SsSï0Y‚gœY‰ÂN;˜˜NT+kde‡Nöÿ‹÷•êˆLR^úNN*0function check_referrer() {if (!isset($_SERVER[HTTP_REFERER]) || $_SERVER[HTTP_REFERER] == “”) {wp_die( __(Please enable referrers in your browser, or, if youre a spammer, bugger off!) );}}add_action(check_comment_flood, check_referrer);------------------------------------------------{, 56 ˜u /Qq60 ˜u -------------------------------------------------
  • 57. 8.W(WordPess [ü‚*gaN-O•u( CSS nÑR¨•è•î˜˜ÿ †}q6Q…•nv„ wp_list_pages()TŒwp_list_categories()Qýep_ˆgu(ÿOF[ƒNìNQA‹¸]LQe <span>QC} 0•Ùh7Ngeÿ1Sê€ýO•u(vîRMg•^v„ CSS nÑR¨•èb€g/N†0€N^x•Ðv„f/ÿbNìSꉕz_®PR©NNPHP TŒkcRˆh•¾_1€ýYW( WordPress SZ[¢N-O•u(•…‘wv„nÑR¨•èb€g/N†0u1NŽgQsCSS nÑR¨•èv„eYz]ò~Ï_ˆYN†ÿVàkdW(•Ù‘ÌbNì1N[ùQv]åOe¹_Q•PZNûOU‹ôf0Y‚gœO``ó[ùkdb€g/•ÛˆLfômñQev„N†‰ãÿSïNåww •Ù{Ç|¾TÁe‡zà 0`óww[ž–EeHgœv„‹Ýÿ‹÷ p¹Qû•Ù‘Ì 0 1. R^úO`b@—v„VþrGÿ^v[ù WordPress Y‰ÂN;˜˜N-v„ style.css e‡Nö•ÛˆL••‘0•Ù‘Ì~ÙQúO‹[Pÿ #nav a, #nav a:visited { display:block; } #nav a:hover, #nav a:active { background:url(images/tab-right.jpg) no-repeat 100% 1px; float:left; } #nav a span { float:left; display:block; } #nav a:hover span { float:left; display:block; background: url(images/tab-left.jpg) no-repeat 0 1px; } 2. s°W(‹©bNìge••‘ header.php e‡NöT0h9cn•êŽ«—‰•Y‚NNãxYR6|˜•4•ÛS»SsSïÿ <ul id="nav"> <li><a href="<?php echo get_option(home); ?>/"><span>Home</span></a></li> <?php echo preg_replace(@<li([^>]*)><a([^>]*)>(.*?)</a>@i, <li$1><a$2><span>$3</span></a>, wp_list_pages(echo=0&orderby=name&exlude=181&title_li=&depth=1)); ?> </ul> RQú˜u—bÿ <ul id="nav"> <li><a href="<?php echo get_option(home); ?>/"><span>Home</span></a></li> <?php echo preg_replace(@<li([^>]*)><a([^>]*)>(.*?)</a>@i,------------------------------------------------{, 57 ˜u /Qq60 ˜u -------------------------------------------------
  • 58. <li$1><a$2><span>$3</span></a>, wp_list_categories(echo=0&orderby=name&exlude=181&title_li=&depth=1)); ?> </ul>Nãx‹ôfÿ kdO‹N-ÿbNìW( wp_list_pages()TŒwp_list_categories()QýepN-O•u(N†echo=0 S‘Ïÿ[ƒQA‹¸O`ƒ·SÖQýep~Ógœ€eà—Qvvôc¥bSSpW(O^UN0c¥w@Qýep~Ógœu(NŽ PHP preg_replace()Qýepÿ^vg~Èf>y:Qúgeÿkdeö <li>TŒ <a>h{~NK•ô]òR QeN†<span>h{~09. WordPress SZ[¢v~SØY4Vþ•î˜˜ÿ xnRW0‹ô•Ù^vNf/NÀNH•î˜˜ÿOFgN WordPress u(b7^g•ê]ñv„SZ[¢Y4Vþ€ýYN0[ÌYSØ0‰ãQ³e¹hHÿ 1. _SO`vøN-N†NN›Y4VþVþrGTÿ[ƒNìT}TN: 1.jpg, 2.jpg, 3.jpgÿ‹øY‚kd|{0_Sq6ÿO`SïNåO• u(NûaYv„VþrG0 2. VþrGNO R0 wp-content/themes/yourtheme/images vî_UN0 3. bS_ header.php e‡Nöÿ^vY‚NNãx|˜Qeÿ $num = rand(1,10); //Get a random number between 1 and 10, assuming 10 is the total number of header images you have &ltdiv id="header" style="background:transparent url(images/.jpg) no-repeat top left;"> 4. [Œbÿs°W(SZ[¢T˜u—bbeå _טu—bOf>y:–•g:v„Y4VþN†0Nãx‹ôfÿ •Ù‘Ìl¡NÀNHY}‹ôv„0bNìvôc¥O•u( PHP rand()QýepRYËSNN*$num SØ‘Ïge–•g:ƒ·SÖ 1 R010 NK•ôv„ep[W0c¥w@bNì $num SØ‘Ïv„~Ógœ•ÞN_SRMY‰ÂN;˜˜v„•ï_„1 OK N†010.f>y:d°Q™‹¡R•î˜˜ÿ ‹¸YSZN;•ý^g•ê]ñbågfôYv„‹û€ÿgfôYv„ RSS feed0€bŠe‡zàd°Q™‹¡R•WRQúgef>q6€ýcК؋¿[¢v„Y}YG_ÃTŒQt•£0‰ãQ³e¹hHÿ bS_NûaNN*N;˜˜e‡Nö^v|˜•4•ÛNåNNãxÿ<?php$my_query=newWP_Query(post_status=future&order=DESC&showposts=5);if($my_query->have_posts()){while($my_query->have_posts()):$my_query->the_post();?><li><?phpthe_title();?></li><?phpendwhile;}?>------------------------------------------------{, 58 ˜u /Qq60 ˜u -------------------------------------------------
  • 59. Nãx‹ôfÿ W(•ÙN*Nãxe9•ÛN-ÿbNìO•u( WP_Query |{R^úN†•ê[šNI‹íSåNåSÑ•epcn^“gå‹â^vcÐSÖg•Ñ‰•d°Q™v„N”{Çe‡zà0[ŒbTÿ|û~ß1OO•u(NN*{€mv„ WordPress _ªs¯gef>y:e‡zàh˜˜0O§•¹R Qev{–FuL—bÿ <li> <?php global $user_ID, $user_identity, $user_level ?> <?php if ( $user_ID ) : ?> <h2>c§R6—bg•</h2> <ul> <li>]òv{_U <strong><?php echo $user_identity ?></strong>. <ul> <li><a href="<?php bloginfo(url) ?>/wordpress/wp-admin/">TSð </a></li> <?php if ( $user_level >= 1 ) : ?><li><a href="<?php bloginfo(url) ?>/wordpress/wp-admin/post-new.php">d°Q™e‡zà /a></li> < <?php endif // $user_level >= 1 ?> <li><a href="<?php bloginfo(url) ?>/wordpress/wp-admin/profile.php">N*Nº•De™ </a></li> <li><a href="<?php echo wp_logout_url() ?>">lè• </a></li> </ul> </li></ul> <?php elseif ( get_option(users_can_register) ) : ?> <h2>v{_U </h2> <ul> <li> <form action="<?php bloginfo(url) ?>/wordpress/wp-login.php" method="post"> <p> <label for="log"><input type="text" name="log" id="log" value="<?php echowp_specialchars(stripslashes($user_login), 1) ?>" size="22" /> u(b7 </label><br /> <label for="pwd"><input type="password" name="pwd" id="pwd" size="22"/>[Æx </label><br /> <input type="submit" name="submit" value="Send" class="button" /> <label for="rememberme"><input name="rememberme" id="rememberme"type="checkbox" checked="checked" value="forever" /> ‹°OOb </label><br /> </p> <input type="hidden" name="redirect_to" value="<?php echo$_SERVER[REQUEST_URI]; ?>"/> </form> </li> <li><a href="<?php bloginfo(url) ?>/wordpress/wp-register.php">lèQŒ</a></li> <li><a href="<?phpbloginfo(url) ?>/wordpress/wp-login.php?action=lostpassword">b~VÞ[Æx</a></li> </ul>------------------------------------------------{, 59 ˜u /Qq60 ˜u -------------------------------------------------
  • 60. ƒ·SÖSU{Çe‡zàQ…v„Qs•.[WSÊcÏ•ðe¹lÕÿ<?php if(is_single()){ $keywords = " "; $tags = wp_get_post_tags($post->ID); foreach ($tags as $tag ) { $keywords = $keywords . $tag->name . ","; } if (have_posts()) : while (have_posts()) : the_post(); if(strlen($text) > 150) { $text = substr($text,0,150); $text= mb_convert_encoding($text,"UTF-8"); $text=preg_replace("/(s+)/","",$text); } } if ($post->post_excerpt){ $text = mb_substr(strip_tags($post->post_excerpt),0,150); } else { $text = mb_substr(strip_tags($post->post_content),0,150); }?> <meta name="keyword" content="<?php echo $keywords; ?>"/> <meta name="description" content="<?php echo $text; ?>"/> <?php } else { ?> <meta name="keyword" content="ƒIh9‹Ä‹ºÿeöN‹~ÏmNÿ•Q~Üpíp¹ÿ IT ‰Æp¹ÿge°•oNöÿ•QzÙ SEOÿ_Ã`ÅeEN‹"/> <meta name="description" content="<?php bloginfo(description); ?>"/> <?php } ?>------------------------------------------------{, 60 ˜u /Qq60 ˜u -------------------------------------------------