我的頁腳正在鏈接音樂頁面上的帖子,無法弄清楚爲什麼它會混淆。我想分開像其他網頁。僅供參考,我使用wordpress插件「自定義」字段來在音樂頁面上創建帖子。 http://listentotheway.com/music/頁腳在內容區域混淆。
music.php:
<?php
/*
Template Name: Music Page
*/
get_header(); ?>
<div class="wrapper">
<div id="music-content">
<p> This is music.php </p>
<?php
$args = array(
'post_type' => 'music'
);
$the_query = new WP_Query($args);
?>
<?php if (have_posts()) : while ($the_query->have_posts()) : $the_query->the_post(); ?>
<h3><a href="<?php the_permalink(); ?>"<?php the_title(); ?></h3>
<?php the_field('description'); ?> <-----This has to do with the plugin.
<?php endwhile; else: ?>
<?php endif; ?>
</div>
</div>
<?php get_footer(); ?>
的style.css:
/* music page */
#music-content {
display: block;
float: left;
}
/* Footer */
footer {
background-color: #eaeaea;
display: block;
clear: both;
border-top: 1px black solid;
}
我假設它給你沒有錯誤開發人員工具或頁面源視圖? b.c通常這些東西只是一個缺少的div或關閉標籤或什麼不應該在源代碼中顯示爲鉻或火狐 – bob
是的,我沒有得到任何錯誤。但是,我一定能夠發現這樣的錯誤,但這會帶來更多的經驗。很高興爲我這樣的初學者提供了Stackoverflow。感謝您的輸入。 – Waymond