新的WP页面模板,调整bootstrap,现在有些东西不起作用

时间:2015-07-13 14:43:09

标签: wordpress twitter-bootstrap drop-down-menu wordpress-theming

基于默认模板制作WP页面模板,仅调整主内容区域宽度和侧边栏的引导程序详细信息。它看起来很棒,如下所示: [https://www.bodyzone.com/certified-posture-exercise-professional/][1]

但是

1)标题下拉菜单不再有效 - “你的姿势”下面应该有4-5个链接,而商店应该显示2页的下拉列表。

2)未使用新模板的其他页面上列出的项目显示不正确。产品以2列显示,图像被炸毁和扭曲。它们应该是4列,更小。

我使用新模板创建了10个新页面但是其他地方都没有应用模板。但似乎我的做法改变了网站上的其他内容。

新页面模板:

get_header(); ?>

<!-- Begin page content -->

    <main role="main">
        <div id="content">
<!-- Page content -->
        <div class="container">
        <div class="row">
        <div class="col-lg-8">
           <style scoped>
           p { font-size:1.9em; }
           </style>
  <section> 

<?php if (have_posts()): while (have_posts()) :    the_post(); ?>

      <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
         <h1 class="page-title"><?php the_title(); ?></h1>

<?php if ( has_post_thumbnail()) : // Check if Thumbnail exists ?>

   <figure class="page-wp-post-image">

<?php the_post_thumbnail(); // Fullsize image for page ?>

   <figcaption><?php echo get_post(get_post_thumbnail_id())->post_excerpt; ?

   </figcaption>
   </figure>
<?php endif; ?>

<?php the_content(); ?>
<?php edit_post_link('<i class="fa fa-pencil-square-o"></i> Edit', '<p>',
 '</p>'); ?>

      </article>

<?php endwhile; ?>

<?php else: ?>

      <article>
         <h2><?php _e( 'Sorry, nothing to display.', 'html5blank' ); ?></h2>
      </article>

<?php endif; ?>
  </section>
      </div>

      <div class="col-lg-4">
<?php get_sidebar(); ?>
      </div>
      </div>
      </div>
      </div>        
<?php get_footer(); ?>

默认页面的原始bootstrap div类 - 内容 - 就是这个 <div class="col-xs-12 col-sm-9 col-sm-push-3 col-lg-10 col-lg-push-2">

侧边栏就是这个 <div class="col-xs-12 col-sm-3 col-sm-pull-9 col-lg-2 col-lg-pull-10">

我继承了这个网站,只是对引导程序的理解 - 但显然我错过了一些东西。

0 个答案:

没有答案