我试过很多教程自定义标题的支持,但我能加起来的支持,但我不能够改变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