私の無知を実感して、私は非常にウェブのシーンに新しいです。私は私のカスタムテーマにサイドバーとフッターがありません。ヘッダーとコンテンツには背景イメージを表示できますが、フッターとサイドバーには表示されません。私はいくつかのチュートリアルに続いて、インターネットの両端について調べて、私が間違っていることを理解できません。ワードプレス - 足りないサイドバーとフッター
ヘッダー、コンテンツ、および右側のサイドバーで構成されるレイアウトを作成しようとしています。私はWordPressのサイドバーに何も欲しくない。私はサイトのナビゲーションとそこにログインするつもりですが、私は背景が表示されたいです!私は下の基本的なコードを掲示し、私のサイトhereへのリンクを与えます。前もって感謝します!
のindex.php
<div id="container">
<div id="content" role="main">
<?php
/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-index.php and that will be used instead.
*/
get_template_part('loop', 'index');
?>
</div><!-- #content -->
</div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
header.phpの
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>" />
<title><?php
/*
* Print the <title> tag based on what is being viewed.
*/
global $page, $paged;
wp_title('|', true, 'right');
// Add the blog name.
bloginfo('name');
// Add the blog description for the home/front page.
$site_description = get_bloginfo('description', 'display');
if ($site_description && (is_home() || is_front_page()))
echo " | $site_description";
// Add a page number if necessary:
if ($paged >= 2 || $page >= 2)
echo ' | ' . sprintf(__('Page %s', 'twentyten'), max($paged, $page));
?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url');?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php
if (is_singular() && get_option('thread_comments'))
wp_enqueue_script('comment-reply');
wp_head();
?>
</head>
<body <?php body_class(); ?>>
<div id="wrapper" class="hfeed">
<div id="header">
<div id="masthead">
.......
</div><!-- #masthead -->
</div><!-- #header -->
<div id="main">
sidebar.php
<div id= "sidebar" class="widget-area" role="complementary">
</div><!-- #sidebar -->
footer.php
</div><!-- #main -->
<div id="footer" role="contentinfo">
</div><!-- #footer -->
</div><!-- #wrapper -->
<?php wp_footer(); ?>
</body>
</html>
のstyle.css
/*
Theme Name: Mod Theme
Theme URI: http://www.itssimplydesign.com/wordpress/wp-content/themes/mod_theme/
Description: My First Theme
Version: 1.0
Author: Jason
Author URl: http://www.itssimplydesign.com
*/
/* =Layout
-------------------------------------------------------------- */
/*
LAYOUT: Header, Content and Sidebar
DESCRIPTION:
*/
body {
background-color: #e6e9Df;
}
#container {
float: left;
margin: 0 -240px 0 0;
width: 100%;
}
#header {
background: url(http://www.itssimplydesign.com/wordpress/wp-content/themes/mod_theme/images/background_main_01.png) no-repeat;
width: 1000px;
height: 332px;
}
#sidebar {
background: url(http://www.itssimplydesign.com/wordpress/wp-content/themes/mod_theme/images/background_main_03.png) no-repeat;
float: right;
clear: right;
overflow: hidden;
width: 300px;
}
#content {
background: url(http://www.itssimplydesign.com/wordpress/wp-content/themes/mod_theme/images /background_main_02.png) no-repeat;
min-height: 668px;
width: 700px;
float: left;
}
#footer {
clear: both;
width: 100%;
}
フッタに何もコードしていません。何かを加えてそれをチェクしてください。 – Rikesh
非常に良い点。フッターは機能します。サイドバーは私の大きな関心事です。背景画像が表示されない理由は何ですか? – atomSmasher
同じようにサイドバーが働いています.plzチェックしてください – Rikesh