css
  • wordpress
  • 2013-07-26 25 views -2 likes 
    -2

    我試過很多教程自定義標題的支持,但我能加起來的支持,但我不能夠改變header..Down這裏的index.php自定義頭支持WordPress的

    <div id="page"> 
        <div id="header"><h1>Super Plain</h1></div> 
        <div id="nav"> 
         <ul> 
          <?php wp_list_pages('title_li=');?> 
         </ul> 
        </div> 
    
        <div id="main"> 
         <div id="content"> 
           <?php if(have_posts()): while(have_posts()): the_post(); ?> 
           <h1><?php the_title(); ?></h1> 
           <?php the_content(); ?> 
           <?php endwhile; endif; ?> 
         </div><!--/ #content --> 
    
         <div id="sidebar"> 
          <h2>News</h2> 
          <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ornare sodales porta. Mauris laoreet tempor luctus. Nunc consequat </p>   
         </div><!--/ #sidebar --> 
        </div><!--/ #main --> 
    
    </div><!--/ #page --> 
    

    這裏我的CSS

    #header{ 
         background-color:#c1d9c5; 
         color:#405952; 
         padding:55px; 
    } 
    #header h1{ 
         margin:0; 
         font-size:72px; 
         font-weight:normal; 
    } 
    

    ,這裏是我的function.php文件

    <?php 
    $args = array(
        'width'   => 980,`enter code here` 
        'height'  => 60, 
        'default-image' => get_template_directory_uri() . '/images/header.jpg', 
    ); 
    add_theme_support('custom-header', $args); 
    ?> 
    
    +0

    目前還不清楚你實際上想要完成什麼。我知道您正在嘗試對*標題*進行編輯,但需要進行哪些特定編輯? – Swordfish0321

    +0

    是啊,我正在嘗試編輯標題,以及我知道我可以從CSS更改標題,但是我想在我的主題中向用戶提供此功能,以便他可以通過上傳圖像輕鬆更改標題 – user2233501

    回答

    0

    爲什麼你嘗試,你什麼時候啓用自定義頁眉可以通過編輯CSS樣式表來輕鬆更改標題圖片?

    +0

    我知道我可以改變它,但我需要提供這個自定義標題更改功能,在我設計的WordPress主題....所以請幫助我這個 – user2233501

    +0

    是啊,明白你的需要。所以我建議你看看這個功能簡單的wordpress主題,並將你的代碼和那個代碼進行比較。我不認爲你可以在這個頁面獲得幫助。 – Farzad

    相關問題