我試過很多教程自定義標題的支持,但我能加起來的支持,但我不能夠改變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);
?>
目前還不清楚你實際上想要完成什麼。我知道您正在嘗試對*標題*進行編輯,但需要進行哪些特定編輯? – Swordfish0321
是啊,我正在嘗試編輯標題,以及我知道我可以從CSS更改標題,但是我想在我的主題中向用戶提供此功能,以便他可以通過上傳圖像輕鬆更改標題 – user2233501