过期域名预定抢注

 找回密碼
 免费注册

wordpress專業解決問題

 火... [複製鏈接]
 樓主| 發表於 2013-7-18 05:49:22 | 顯示全部樓層
smallvally 發表於 2013-7-16 22:43
0 p; |9 R7 s/ n0 I  |" e% gkankan大師,又來請教你一個難題了,& K' e1 R( E9 C9 t0 \% Y
我最近有個站是個下載站,需要列出資源的 大小,型號,以及每篇都會有 ...
0 A/ f6 B5 j4 [. \0 K1 o
http://wordpress.org/plugins/advanced-custom-fields/
9 ?1 p7 @( A5 J9 a) `  {! _4 @5 b" |0 d. `4 K6 J' v
用這個插件. 下面的鏈接教你怎麼在主題裡顯示.1 e5 W! m0 U" L' R" a+ h6 i

# U. |& {. }8 t& n5 c  ?http://www.advancedcustomfields.com/resources/getting-started/displaying-custom-field-values-in-your-theme/
. |" Y# D4 L. u: l0 m4 w8 z. Z0 n5 A9 H5 i8 H6 ~4 c/ W

評分

參與人數 1點點 +3 收起 理由
smallvally + 3 感謝!

查看全部評分

回復 给力 爆菊

使用道具 舉報

發表於 2013-7-18 12:24:11 | 顯示全部樓層
零PHP基礎,看了下,貌似暫時駕馭不了啊,有時間再仔細琢磨下。感謝!
. G2 Z) g- S7 W' L: |/ E+ T2 W# p' H
回復 给力 爆菊

使用道具 舉報

發表於 2013-7-24 14:19:01 | 顯示全部樓層
樓主牛人 加好人一個+ l/ ]  l  W2 L  h* E# e
希望樓主不吝賜教# \5 ~  P' _& ^9 [5 c; W: }
回復 给力 爆菊

使用道具 舉報

發表於 2013-8-23 17:49:36 | 顯示全部樓層
請問版主,XML-RPC的時候如果分類不存在能不能自動創建分類?能否給下相應的函數, T1 s# A$ F9 M: k6 R+ F. h( _& n
回復 给力 爆菊

使用道具 舉報

 樓主| 發表於 2013-8-24 12:59:29 | 顯示全部樓層
frankwng1985 發表於 2013-8-23 17:49 % V/ ?  B! N& @
請問版主,XML-RPC的時候如果分類不存在能不能自動創建分類?能否給下相應的函數9 u1 n; u% m& o/ }/ s6 r0 B6 {
...

9 K4 I# _( J% u$ D. P0 {" C# j9 Xwp-includes/class-wp-xmlrpc-server.php
) K4 I: J# A+ G* a4 I' C3 \' D4 \
wp_newPost  函數.% y3 w+ j; d9 G1 s2 m, ~4 Q8 P
/ M5 _. D7 K5 Z0 |5 j1 y7 w
看這個參數 terms_names - array, with taxonomy names as keys and arrays of term names as values
- }  _3 l7 K- O& L) \1 N( F
" I+ C7 F% d5 I) H5 \9 w跟蹤_insert_post函數, 發現會自動創建不存在的category.
7 a! l  c) v6 c. H( n3 K+ F+ n, w( a6 q& w1 f1 q: ~) i  g# q5 I
好久沒研究xmlrpc了, 老版本wp是不支持的.  我也不知道什麼時候引進這個terms_names參數的,你自己研究下2 r; B9 |( h: Z: F

# x6 X8 h. p+ F; }- ~8 w+ k2 {/ E/ ]3 |

7 B; x" u0 S- T, l& |& o( B: f8 ?% o  ~  S
回復 给力 爆菊

使用道具 舉報

發表於 2013-10-10 21:36:10 | 顯示全部樓層
,我做的一個站,有個模板,為什麼首頁不顯示,是不是出現什麼問題的呢?我網站是:http://www.healthprotections.com8 F: v. `& O  u6 o
& ?& [% l2 }' o7 u$ Y0 N
首頁代碼是:
  1. <?php get_header(); ?>
    3 D9 ~' U" c8 T9 S* E

  2. ! e2 A% o4 U- a) @, m6 i4 ?0 i
  3. <!-- content -->
    % }4 Y$ {8 y  |' B! r; N5 d
  4. <div class="content">
    . Q3 Q! H5 V& r  e. B# z5 _
  5.         ) v5 J2 p& c# @# ]
  6.         <?php if ( !function_exists('dynamic_sidebar')
    & n9 B) B7 [" @) k, x) C5 E
  7.         || !dynamic_sidebar('Ad Position 2') ) : ?>1 Q  t$ O& G8 o+ X' |& ~( m0 q8 \
  8.         <?php endif; ?>
    # ^5 y7 O; `1 `
  9.    
    . k& [# n9 [% f
  10.     <!-- leftcontent -->: o' Y& m1 V3 m, n# l" C. Q
  11.     <div class="<?php if ( substr(of_get_option('site_layout'),-1) == 'l' ) { echo 'leftcontent-l'; } else { echo 'leftcontent';}?>">+ |6 \& x& J% b/ W1 k
  12.                 & T& }, Z  `( \+ _- J7 e8 x
  13.                 <?php if ( !function_exists('dynamic_sidebar')' _1 w* L: |4 n6 m- J$ g: X- B
  14.                 || !dynamic_sidebar('Ad Position 3') ) : ?>' ^7 S1 H# ?+ X  s% Y
  15.                 <?php endif; ?>
    ; Z/ j& s+ b. u, |/ K$ h
  16.         
    # x8 ^& e3 K6 S# p9 b/ Y
  17.         <?php if ( of_get_option('homeheading') <> "" ) { ?>
    4 P# U0 d; r! }6 G9 C4 @
  18.         <h1 class="postmargin"><?php echo of_get_option('homeheading'); ?></h1>
    + K) c& R2 [# j/ V2 c0 D& |' \& I
  19.         <?php } ?>
    & u7 c) P# F. S
  20. 3 D# i: I) J. b/ e( U* e% R
  21.         <?php if ( of_get_option('homeintro') <> "" ) { ?>
    + q7 A' A/ v. U7 [6 X, L
  22.         <div class="intro">
    & I7 `9 _7 C/ ?% [
  23.                        
    ) _1 Z% ]- U. I
  24.                         <?php if ( !function_exists('dynamic_sidebar')
    ' x( Q' S# B8 s4 J/ h3 N. h. j  H
  25.                         || !dynamic_sidebar('Ad Position 5') ) : ?>( r7 u5 `9 h/ n
  26.                         <?php endif; ?>( |8 Q* N/ D/ b- L8 A. D% p9 p
  27.                         * T6 ?/ V: }( T& l. ^# F9 c  R: p
  28.                         <?php if ( !function_exists('dynamic_sidebar')
    6 K& ]1 d+ r. B
  29.                         || !dynamic_sidebar('Ad Position 6') ) : ?>) @! E/ z) z. |
  30.                         <?php endif; ?>
    / b/ q) w) D2 }) w- [* V
  31.                        
    % N( \& R' c/ r5 Z( h
  32.                 <?php if ( of_get_option('intro_image') <> "" ) { ?><?php if ( of_get_option('intro_image_url') <> "" ) { ?><a href="<?php echo of_get_option('intro_image_url'); ?>" rel="nofollow" target="_blank"><?php } ?><img src="<?php echo of_get_option('intro_image'); ?>" align="left" class="introimage" alt="<?php if(of_get_option('intro_image_alt')){ ?><?php echo of_get_option('intro_image_alt'); ?><?php } else { ?><?php bloginfo('name'); ?><?php } ?>"><?php if ( of_get_option('intro_image_url') <> "" ) { ?></a><?php } ?><?php } ?>
    ! b, `! j) B  G9 T- r$ U
  33.                         <?php echo stripslashes(of_get_option('homeintro')); ?>
    & [# K8 A) R0 ~$ t9 m
  34.         </div>
    . f# Y. M7 ~  _  w; G4 x
  35.         <?php } ?>! t0 C3 s9 k5 `2 }9 R4 n
  36.                
    0 g1 g) Z: F/ c( n
  37.                 <?php if ( !function_exists('dynamic_sidebar'): F& x" j2 g* C2 P
  38.                 || !dynamic_sidebar('Ad Position 7') ) : ?>6 E. R8 a" `- V1 j( F3 `! |# \8 W8 g
  39.                 <?php endif; ?>
    ; i4 n6 v* r6 b# s
  40.                 7 r9 C# ~& _$ t. B  n/ h) k
  41.                 <?php if ( of_get_option('show_home_posts')) { ?>
    5 y- v3 J: ]5 M. A
  42.                 . K! L' L& h! w% c( Q9 X" ~# N
  43.                 <?php if ( of_get_option('categories_home') <> "" || of_get_option('home_posts') ) { ?>
    3 r% {  m7 u  h3 [% u3 Z" U& q  ]; d8 ]
  44.                         <?php $cattoinclude = of_get_option('categories_home'); ?>/ r; p6 n# o) W- a- G/ N
  45.                         <?php $homepostnumber = of_get_option('home_posts'); ?>3 y) _  p9 @9 W; f! r- o5 J. \
  46.                 <?php query_posts('cat='.$cattoinclude.'&showposts='.$homepostnumber); ?>& E2 F2 h1 Q0 S4 U# O" i0 R0 t
  47.                 <?php } ?>" W* c1 P- |4 f) S
  48.         - {6 z# X8 ~( T4 l# h6 a+ ]9 d
  49.                 <?php if (have_posts()) : while (have_posts()) : the_post(); ?>3 O. @' Z7 d: c9 S5 F
  50.                 8 X# {2 g* I. B3 e# K
  51.             <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'med-thumb' ); ?>
    - ^$ F) y. `# o
  52.             <?php if ($image): ?>  e7 a2 L( ?4 Y( g- d: s0 I+ q9 ]
  53.                                        
    + w; U+ l, r9 \6 C* K  ], Y( G
  54.                 <!-- post -->& n5 `( V' D% A9 Y# P( ]( D
  55.                 <div class="post">
    ! Y% t- [9 S' ^8 Y; ~3 Z
  56.                                         7 \) b  o; _5 g1 H9 ~
  57.                     <?php if ( of_get_option('home_excerpt')) { ?>
    ; k' n! ?( w, f2 f1 S
  58.                                
    * g$ S, w( {" U7 f/ `% B0 A! ^3 l
  59.                         <h2<?php if(!of_get_option('showmeta')){ ?> class="postmargin"<?php } ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>% k( h4 z+ _+ m) g9 V  b
  60.                                                 <?php if ( of_get_option('showmeta')) { ?>% j) R1 g- R: I6 c
  61.                         <div class="post_meta">: Y/ _+ x/ x* L% Z% [* `
  62.                             <ul>$ y& [8 u' o: R% r
  63.                                 <li><?php the_time('M d, Y'); ?></li>9 O+ G: T, i: p6 ~
  64.                                 <li>|</li>
    - I) W& p& E. Y- M: `
  65.                                 <li><?php the_category(', '); ?></li>
    8 [1 Y6 E$ Y' t' x( U) o
  66.                                 <li>|</li>3 W! a( u$ d* R9 F+ P2 W% [" k4 H
  67.                                 <li><?php comments_popup_link('Comments', '1 Comment', '% Comments'); ?></li>8 x# }7 z) M" [, C- }  `( [) v
  68.                             </ul>
    . g, o/ j) g* ~( A* t; s
  69.                         </div>9 p/ a2 V9 n: v6 F% _1 r; o/ `
  70.                         <?php } ?>3 _2 }6 [/ [. r) `7 X
  71.                         <div class="postleft">4 f( [, v& C3 x3 y& x
  72.                             <a href="<?php the_permalink(); ?>"><img src="<?php echo $image[0]; ?>" width="150" height="150" border="0" title="<?php the_title(); ?>" alt="<?php the_title(); ?>" /></a>4 x) P3 j3 g6 \8 v9 A$ `
  73.                         </div>
    2 i) o$ \7 W3 L( @! S
  74.                         
    - {1 B* f3 I. ?2 Q5 R
  75.                         <div class="postright">  C8 K5 C+ m8 L( X% u7 j' j
  76.                             <p><?php excerpt('200'); ?> <a href="<?php the_permalink(); ?>">Read More »</a></p>
    % |' t5 O( W" _5 F) ]
  77.                         </div>
    & d+ D0 D; [. P2 f0 Z* V. O
  78.                         
    9 z2 o" ^# j9 Z
  79.                         <div class="clear"></div>
    9 I- F' L* I& B  ~
  80.                     : @3 ^2 W. k5 F4 v, E! h# S7 W: W8 M" S
  81.                     <?php } else { ?>
    . f/ V. I# [% D" D" p* ?# u
  82.                             % b: @: T9 M6 Q% R- s' v" E- G
  83.                         <h2<?php if(!of_get_option('showmeta')){ ?> class="postmargin"<?php } ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    1 C. {+ ?% f+ _( P; o+ z3 c3 R3 o
  84.                                                 <?php if ( of_get_option('showmeta')) { ?>2 h6 ^; Y9 b* W7 a! K4 ^
  85.                                                 <div class="post_meta">
    # L. i1 {) F* g6 b: L
  86.                                                         <ul>
    3 E* p5 l- E' ]8 e
  87.                                                                 <li><?php the_time('M d, Y'); ?></li>
    $ Y4 W! P' N+ ]+ N' U
  88.                                                                 <li>|</li>
    ( b! ~' m3 B7 L' M4 ^* Z+ x, ^
  89.                                                                 <li><?php the_category(', '); ?></li>9 J5 l7 R; n6 M; d
  90.                                                                 <li>|</li>
    ; G  g2 X" p8 {" b
  91.                                                                 <li><?php comments_popup_link('Comments', '1 Comment', '% Comments'); ?></li>: \) o3 F) u* {. x" x
  92.                                                         </ul>
    / }. F- l7 D5 G. y; e
  93.                                                 </div>; L! D) W& R- b4 Q7 Y' d3 C
  94.                                                 <?php } ?>
    . I: H  M1 d( H/ _
  95.                         
    : f  n; D, o/ O/ N' K
  96.                             <p><a href="<?php the_permalink(); ?>"><img src="<?php echo $image[0]; ?>" width="150" height="150" border="0" title="<?php the_title(); ?>" alt="<?php the_title(); ?>" align="left" class="fullconentimg" /></a><?php the_content(); ?></p>" |" {3 U, O+ H4 k# W' Q+ ~6 e9 {! `4 B6 \
  97.                         
    / a6 R" @# D& c+ a1 ]
  98.                         <div class="clear"></div>6 W& s& m9 m; ]6 T! t* @+ p* Z7 h
  99.                     
      E& M9 a1 X9 W) c( G) J( e
  100.                     <?php } ?>
    % g5 Q! k# {: c0 f) p9 d+ D1 Y# M+ U
  101.                                                                 8 o# T- l0 t6 a
  102.                 </div>
    % k5 w( F9 d5 w4 M3 s& g
  103.                 <!-- end post -->
    - P' |  W) p& ~4 w
  104.             
    - \7 j, ?6 |3 @' L* b2 B4 \, p% @
  105.             <?php else: ?>$ E' v  ^9 _6 d
  106.                 ) h* v. d* Z, }9 V' O; B
  107.                 <!-- post -->: `6 ]3 A' J3 V* ?
  108.                 <div class="post">. m" H# O; R( w
  109.                     
    " o8 q; l3 n8 U
  110.                                         <h2<?php if(!of_get_option('showmeta')){ ?> class="postmargin"<?php } ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>* {. D# i! \& F, {0 \
  111.                                         <?php if ( of_get_option('showmeta')) { ?>
    ' @. f9 n, W4 S7 ]5 ?  o7 H
  112.                                         <div class="post_meta">1 e3 u  R4 l; }6 W9 d5 C/ L
  113.                                                 <ul>1 V& c2 D4 P9 r9 ~  T4 ^
  114.                                                         <li><?php the_time('M d, Y'); ?></li>
    * _% n  \8 ]5 I+ Z* ?9 \/ o
  115.                                                         <li>|</li>( B# A6 T" a4 d, }( X: c* r
  116.                                                         <li><?php the_category(', '); ?></li>
    3 D1 W; l) E( N' q9 r
  117.                                                         <li>|</li>
    2 p5 f4 d5 T3 H! ~4 A
  118.                                                         <li><?php comments_popup_link('Comments', '1 Comment', '% Comments'); ?></li>
    ) q+ z  A0 ^( ]; H
  119.                                                 </ul>
    # A' m' k' m7 k
  120.                                         </div>$ F. p# f" J+ `2 v1 l* c; C* {
  121.                                         <?php } ?>
    ) p+ M4 X5 f2 z8 j2 K/ r# h7 t
  122.                     <?php if ( of_get_option('home_excerpt')) { ?>2 H( X$ y8 z( B8 b
  123.                                         <p><?php excerpt('300'); ?> <a href="<?php the_permalink(); ?>">Read More »</a></p>
    3 P/ Z4 T& c9 ?% D3 S) H* u
  124.                                         <?php } else { ?>$ X: s, f- |5 S% C
  125.                                         <p><?php the_content(); ?></p>8 V9 c9 u  y9 O+ M4 a
  126.                                         <?php } ?>
    ) E5 D' d5 ~8 R
  127.                
    # l+ G8 G- L3 W8 ]
  128.                 </div>
    4 A, o1 ~0 m( l' A) f3 c' f
  129.                 <!-- end post -->, ^4 m9 P2 f: n* M0 c
  130.                
    : D" M6 x3 a; w' t
  131.             <?php endif; ?>
    1 n+ H7 Q( t9 e3 ^
  132.                 3 s/ B8 e2 W- _! v! i# m: ]
  133.                 <?php endwhile; endif; ?>
    ( w) D' ?, g1 |: K" M, e& q7 y5 b
  134.                 3 G8 i' O' _4 [( \
  135.                 <?php } ?>
    8 Q6 S' C6 z, `7 X- N! U9 k  ?
  136.                 $ k" {9 \' z% H  v4 U
  137.                 <?php if ( !function_exists('dynamic_sidebar')- f% l5 y5 [5 K
  138.                 || !dynamic_sidebar('Ad Position 8') ) : ?>
    6 W4 N9 [$ z( N+ G+ W/ B7 e
  139.                 <?php endif; ?>
    5 i5 H; q& w2 e) w1 I4 ~7 ^
  140.    
    , ^- z$ y8 f  a5 q
  141.     </div>) `% \- M! `& C! _) \
  142.     <!-- end leftcontent -->
    ' j7 F0 v$ H. a
  143.         : U6 k: m# N9 H- F- ]
  144.         <?php if(of_get_option('site_layout') == '3c-l' || of_get_option('site_layout') == '3c-r'){ ?>
    ; \1 V+ X* ~4 N0 M+ `
  145.         <div class="midcontent">& |& E* I. x* ?4 e2 p
  146.                 <?php if ( !function_exists('dynamic_sidebar')
    2 R4 ~) G/ N" j( e) b# E; {
  147.                 || !dynamic_sidebar('Middle Column') ) : ?>
    8 w4 S7 `; `3 L% k2 m0 m; }) s
  148.                 <?php endif; ?>
    4 Z8 h3 V; H1 ^5 l9 K7 g
  149.         </div>2 _) g1 {8 q) J8 }3 q+ Y$ r  Q" H
  150.         <?php } ?>8 s* o( p8 o2 X1 Y7 Z
  151.     # p# E- S. H) {" q* M% F5 s
  152.         <?php get_footer(); ?>
複製代碼
這個代碼是不是有什麼問題?應該怎麼修改的呢?5 v6 n, A" h8 S; S3 F$ t
回復 给力 爆菊

使用道具 舉報

 樓主| 發表於 2013-10-12 11:08:36 | 顯示全部樓層
fnzxl 發表於 2013-10-10 21:36 * K2 d! }# g; N4 k+ D& D
,我做的一個站,有個模板,為什麼首頁不顯示,是不是出現什麼問題的呢?我網站是:http://www.healthprote ...
, o9 e9 a* r6 ~+ j. H+ J. X4 r
額,這個帖子我都不關注了.
, B/ }! S8 r. O( T4 i( y
" m7 |. e5 L, ^. Z% H. a2 @4 y空白應該是主題有些錯誤.
' D; D$ `8 X' d# |* B) u/ l
! c5 [8 T3 `# `: jhttp://codex.wordpress.org/Debugging_in_WordPress#WP_DEBUG- X6 g0 T- ?! M) M5 [% C- i, i$ y

) x6 \9 x4 T0 a; @
" P$ q2 }+ h6 E加define('WP_DEBUG', true); 到 wp-config.php 看看
% Z; O1 o# }" o! R) P9 J! R+ u) R
& H8 t8 i. a* C2 s) I8 S
回復 给力 爆菊

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 免费注册

本版積分規則

过期高净值品牌域名预定抢注

點基跨境 數位編輯創業論壇

GMT+8, 2025-6-20 00:58

By DZ X3.5

小黑屋

快速回復 返回頂部 返回列表