css
  • wordpress
  • 2013-07-26 24 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

    相关问题