s

wordpressの検索結果ページをAutoPagerizeに対応させてみた

wordpressAutoPagerize に対応させてみました。 テーマに、Vicuna を使っていると link-template.php ではなく Vicuna 内の修正が必要になります。 修正の詳細が知りたい方は Continue reading をクリックしてください。

参考 cocoa*life - AutoPagerizeに対応させました。 R405 - Wordpress2.7にAutoPagerize導入(Vicuna)

[php] $ cd /path/to/wp-content/themes/wp.vicuna.ext/ma38su-wp.vicuna-xxxxx/ $ svn diff

Index: search.php

--- search.php (リビジョン 3) +++ search.php (作業コピー) @@ -22,7 +22,7 @@ the_post(); $title = get_the_title(); ?> -

+

<a href="">

  • Index: functions.php

    --- functions.php (リビジョン 3) +++ functions.php (作業コピー) @@ -327,6 +327,7 @@ $nextpage = intval($paged) + 1;

    if(!is_single()) {
    
    •  echo "$indentText<div class="autopagerize_insert_before"></div>n";
      if ($max_page &gt; 1)
          echo "$indentText<ul class="flip pager" id="flip2">n";
      if ($paged &gt; 1) {
      

      @@ -337,7 +338,7 @@ if (empty($paged) || $nextpage <= $max_page) { echo "$indentTextt

    • '. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $next_label) ."
    • n";

    •     echo '" rel="next"&gt;'. preg_replace('/&amp;([^#])(?![a-z]{1,8};)/', '&#038;$1', $next_label) ."</a></li>n";
      }
      
      if ($max_page &gt; 1)
      

      Index: tag.php


    --- tag.php (リビジョン 3) +++ tag.php (作業コピー) @@ -20,7 +20,7 @@ while (have_posts()) : the_post(); ?>

    • &lt;div class=&quot;section entry&quot; id=&quot;entry"&gt;
      
    • &lt;div class=&quot;section entry autopagerize_page_element&quot; id=&quot;entry"&gt;
          <h2>&lt;a href=&quot;"&gt;</a></h2>
          <ul class="info">
              <li class="date"></li>
      

      Index: category.php


    --- category.php (リビジョン 3) +++ category.php (作業コピー) @@ -25,7 +25,7 @@ $title = get_the_title(); ?>

    • &lt;div class=&quot;section entry&quot; id=&quot;entry"&gt;
      
    • &lt;div class=&quot;section entry autopagerize_page_element&quot; id=&quot;entry"&gt;
          <h2>&lt;a href=&quot;"&gt;</a></h2>
          <ul class="info">
              <li class="date"></li>
      

      Index: archive.php


    --- archive.php (リビジョン 3) +++ archive.php (作業コピー) @@ -21,7 +21,7 @@ $title = get_the_title(); ?>

    • &lt;div class=&quot;section entry&quot; id=&quot;entry"&gt;
      
    • &lt;div class=&quot;section entry autopagerize_page_element&quot; id=&quot;entry"&gt;
          <h2>&lt;a href=&quot;"&gt;</a></h2>
          <ul class="info">
              <li class="date"></li>
      

      [/php]