| Server IP : 148.113.13.24 / Your IP : 216.73.217.94 Web Server : Apache/2.4.59 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/3.0.2 System : Linux o1.zxs.ovh 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64 User : b051826 ( 1041) PHP Version : 8.2.19 Disable Function : 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,exec,system,passthru,shell_exec,proc_open,popen MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/b051826/web/zenpathjapan.com/public_html/wp-content/themes/zenpathjapan/lib/ |
Upload File : |
<?php
/**
* crumbs.php — breadcrumbs + BreadcrumbList JSON-LD (schema printed in Stage 2 seo path).
*/
defined('ABSPATH') || exit;
function zpj_breadcrumbs() {
if (is_front_page()) return;
$items = [['ホーム', home_url('/')]];
if (is_singular('post')) {
$cat = zpj_primary_cat();
if ($cat) $items[] = [$cat->name, get_term_link($cat)];
$items[] = [get_the_title(), ''];
} elseif (is_category()) {
$items[] = [single_cat_title('', false), ''];
} elseif (is_page()) {
$items[] = [get_the_title(), ''];
} elseif (is_search()) {
$items[] = ['検索結果', ''];
} elseif (is_404()) {
$items[] = ['ページが見つかりません', ''];
} elseif (is_home()) {
$items[] = ['記事一覧', ''];
}
echo '<nav class="zpj-crumbs" aria-label="パンくずリスト"><ol>';
$last = count($items) - 1;
foreach ($items as $i => $it) {
list($label, $url) = $it;
if ($i < $last && $url) {
printf('<li><a href="%s">%s</a></li>', esc_url($url), esc_html($label));
} else {
printf('<li aria-current="page">%s</li>', esc_html($label));
}
}
echo '</ol></nav>';
}