2012-11-12 30 views
0

我正在使用wordpress。我需要顯示10個不同位置的位置頁面。如何解決類似頁面的重複頁面內容問題

所以我爲此創建了一個主題。

在10位置的垂直菜單存在的邊欄中。然後那個位置的地圖就在那裏。並在右側的位置的地址在那裏。每個頁面都有不同的頁面標題。

根據url中的位置名稱,我的代碼正在獲取該位置的地址和名稱,然後顯示它。

我使用SEOmoz搜索引擎優化。因此,它顯示所有這10個頁面都有重複的頁面內容。那麼如何解決這個錯誤呢?

頁面結構如下。

<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> 
<div class="wrapperDiv"> 
<div class="bg"> 
<aside> 
<h2>Locations</h2> 
      <span> 
       <ul class="matt"> 
        <li <?php if(is_page('Locations')) echo 'class="current_page_item"'; ?>><a href="/locations/">Overview</a></li> 
        <?php $args = array(
         'depth'  => 1, 
         'show_date' => '', 
         'date_format' => get_option('date_format'), 
         'child_of'  => 19, 
         'exclude'  => '', 
         'include'  => '', 
         'title_li'  => '', 
         'echo'   => 1, 
         'authors'  => '', 
         'sort_column' => 'menu_order, post_title', 
         'link_before' => '', 
         'link_after' => '', 
         'walker'  => '', 
         'post_status' => 'publish' 
        ); 

        wp_list_pages($args); 
        ?> 
       </ul> 
      </span> 
     </aside> 
     <article class="locations"> 
      <div id="smallnav"> 
      <?php the_breadcrumb(); ?> 
      </div> 
      <h2>Location : <?php echo $p->name;?></h2> 
      <div class="entry-content-locations"> 
      <?php 
    echo '<div id="map"><div id="mapss" style="height:100%; width:100%; float:left;"> </div></div>'; 

      ?> 
       <div id="spanLocs" class="spanLoc"></div>        
      </div><!-- .entry-content -->   
      </div>   
     </article>      
     </div> 
</div> 
</div> 
    <script type="text/javascript"> 
    // Code for google map + Code to fill address in spanLoc 
</script> 
<?php get_footer(); ?> 
+0

這是更好地提供工作示例或至少一個圖像。 – SaidbakR

回答

0

你有兩個冗餘結束div標籤(最後一個)。嘗試刪除它們,看看會發生什麼。事情是這樣的:

.... 
<div id="spanLocs" class="spanLoc"></div> 
</div> 
<!-- .entry-content --> 
</div> 
</article> 
</div> 

<script type="text/javascript"> 
// Code for google map + Code to fill address in spanLoc 
</script> 
<?php get_footer(); ?> 
相關問題