HEX
Server: nginx/1.28.3
System: Linux VM-0-7-opencloudos 6.6.117-45.oc9.x86_64 #1 SMP Thu Dec 4 10:26:39 CST 2025 x86_64
User: www (1000)
PHP: 8.2.28
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.213n.cn/wp-content/themes/rk-blogger/search.php
<?php

/**
 * The template for displaying archive pages
 *
 * Author: wbolt team
 * Author URI: https://www.wbolt.com
 */

get_header();

$have_posts = have_posts();
wb_breadcrumbs(false, false, 'pw');
?>
<div class="container container-search pw">
  <div class="main main-list">
    <div class="header-list">
      <div class="title-list">
        <?php
        global $wp_query;
        $item_count = number_format($wp_query->found_posts);
        $item_count = $item_count > 0 ? '当前搜索词查找到共' . $item_count . '个相关结果' : '';
        ?>
        <h1>搜索:<?php echo '<span>' . get_search_query() . '</span>'; ?></h1>
        <div class="description"><?php echo $item_count; ?></div>
      </div>

      <?php
      $list_display_mode = wb_opt('list_display_mode');
      $mode_list = list_mode();
      if ($list_display_mode == 0 && $have_posts) : ?>
        <div class="ctrl-area" id="J_switchListModeBtns">
          <a class="ctrl-item<?php echo $mode_list == 'a' ? ' current' : ''; ?>" data-mode="a" title="卡片模式"><?php echo wbolt_svg_icon('wbsico-list-a'); ?></a>
          <a class="ctrl-item<?php echo $mode_list == 'b' ? ' current' : ''; ?>" data-mode="b" title="图文模式"><?php echo wbolt_svg_icon('wbsico-list-b'); ?></a>
        </div>
      <?php endif; ?>
    </div>

    <?php if ($have_posts) : ?>
      <?php echo wb_insert_ad_block('list_title', 'adbanner-block under-list-title'); ?>

      <div class="articles-list with-list-mode list-mode-<?php echo $mode_list; ?>" id="J_postList">

        <?php
        $postIndex = 0;
        $adIndex = rand(3, 8);
        $hasListAD = wb_opt('ads.list.type') || wb_opt('ads.list_b.type');

        while (have_posts()) : the_post();
          get_template_part('template-parts/content', get_post_format());

          if ($hasListAD && $postIndex == $adIndex) {
            get_template_part('template-parts/content', 'list-ad');
          }
          $postIndex++;

        endwhile;
        ?>
      </div>

      <div class="loading-bar"></div>
      <?php
      wbolt_the_posts_pagination();
      ?>

    <?php else :
      get_template_part('template-parts/content-none', 'none');
    endif; ?>
  </div>

  <?php get_sidebar(); ?>
</div>

<?php get_footer(); ?>