keiaa
フォーラムへの返信
-
フォーラム: マルチサイト
返信が含まれるトピック: ページネーションの省略記号のいちを設定したいpageNumberDisplayNumber : 3,
ここを設定することで可能でした、
ご思案くださった方々ありがとうございました。フォーラム: マルチサイト
返信が含まれるトピック: ページネーションの省略記号のいちを設定したいすいません上記の
{
jquery.pagination.jsの、118行目の
setPagination : ”,
この部分を正しく設定すればいいということが分かりました。
}
これはおそらく間違いです。フォーラム: マルチサイト
返信が含まれるトピック: ページネーションの省略記号のいちを設定したいjquery.pagination.jsの、118行目の
setPagination : ”,
この部分を正しく設定すればいいということが分かりました。
設定の仕方わかる方いらっしゃいませんか?- この返信は1年、 1ヶ月前にkeiaaが編集しました。
フォーラム: マルチサイト
返信が含まれるトピック: ページネーションの省略記号のいちを設定したいファイルを追加します。
archive.php<?php get_header(); ?> <section class="blog-archive-wrapper"> <div class="blog-archive-wrapper-second"> <div class="blog-archive-outer"> <h2 class="blog-archive-outer-title">新着一覧</h2> <div class="pagination-second "> <div class="list-box pagination"> <div class="items"> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $the_query = new WP_Query(array( 'post_status' => 'publish', 'post_type' => 'post', // ページの種類(例、page、post、カスタム投稿タイプ) 'paged' => $paged, 'orderby' => 'date', 'order' => 'DESC' )); if ($the_query->have_posts()) : while ($the_query->have_posts()) : $the_query->the_post(); ?> <?php // ブログの一覧を表示する start ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="item"> <article class="blog-list__list-item"> <div class="blog-list-category"> <?php $undef_category = (count(get_the_category()) == 0) || in_category('1'); if ($undef_category == true) { $category = get_the_category(); echo $category[0]->cat_name; } else { $category = get_the_category(); echo $category[0]->cat_name . "一覧"; } ?> </div> <div class="blog-list-wrapper-second"> <?php // アイキャッチを表示させる start ?> <div class="blog-item-thumbnail-second"> <?php if (has_post_thumbnail()) : ?> <div class="thumbnail-image-second"><?php the_post_thumbnail(array(240, 148)); ?></div> <?php else : ?> <div class="thumbnail-image-second"> <img src="<?php echo get_template_directory_uri(); ? />/images/sample4.png" alt="デフォルトのアイキャッチ画像" width="240" height="148" /> </div> <?php endif; ?> </div> <?php // アイキャッチを表示させる end ?> </div> <div class="blog-item-content"> <p class="blog-item-day-second"><?php the_time('Y-m-d'); ?></p> <?php // タイトルを表示させる start ?> <a href="<?php the_permalink(); ?>" class="blog-item"> <h3 class="blog-item-title"> <div class="blog-item-title-container"> <?php if (mb_strlen($post->post_title, 'UTF-8') > 20) { $title = mb_substr($post->post_title, 0, 20, 'UTF-8'); echo $title . '…'; } else { echo $post->post_title; } ?> </a> </div> <?php // タイトルを表示させる end ?> <div class="blog-item-txt"> <?php // 抜粋を表示させる start ?> <?php the_excerpt(); ?> <?php // 抜粋を表示させる end ?> </div> </article> </div> <?php break; ?> <?php endwhile; ?> <?php while (have_posts()) : the_post(); ?> <div class="item"> <article class="blog-list__list-item"> <div class="blog-list-category"> <?php $undef_category = (count(get_the_category()) == 0) || in_category('1'); if ($undef_category == true) { $category = get_the_category(); echo $category[0]->cat_name; } else { $category = get_the_category(); echo $category[0]->cat_name . "一覧"; } ?> </div> <div class="blog-list-wrapper-second"> <?php // アイキャッチを表示させる start ?> <div class="blog-item-thumbnail"> <?php if (has_post_thumbnail()) : ?> <div class="thumbnail-image"> <?php the_post_thumbnail(array(240, 179)); ?> </div> <?php else : ?> <div class="thumbnail-image"> <img src="<?php echo get_template_directory_uri(); ? />/images/sample4.png" alt="デフォルトのアイキャッチ画像" width="240" height="179" /> </div> <?php endif; ?> </div> <?php // アイキャッチを表示させる end ?> </div> <div class="blog-item-content"> <p class="blog-item-day-second"><?php the_time('Y-m-d'); ?></p> <?php // タイトルを表示させる start ?> <a href="<?php the_permalink(); ?>" class="blog-item"> <h3 class="blog-item-title"> <?php if (mb_strlen($post->post_title, 'UTF-8') > 20) { $title = mb_substr($post->post_title, 0, 20, 'UTF-8'); echo $title . '…'; } else { echo $post->post_title; } ?></h3> </a> <?php // タイトルを表示させる end ?> <?php // 抜粋を表示させる start ?> <div class="blog-item-excerpt"> <?php echo mb_substr(get_the_excerpt(), 0, 50) . '[...]'; ?> </div> <?php // 抜粋を表示させる end ?> </article> </div> <?php endwhile; ?> <?php endif; ?> <?php // ブログの一覧を表示する end ?> <?php break; ?> <?php endwhile; else : echo '<div><p>ありません。</p></div>'; endif; ?> </ul> </div> </div> </div> </div> </section> <?php get_footer(); ?>
フォーラム: 使い方全般
返信が含まれるトピック: ページキャッシュで、キャッシュが返せません。フォーラム: 使い方全般
返信が含まれるトピック: ワードプレスのホームのトップ画像が表示されない。デベロッパーツールは
navigator.userAgent、navigator.appVersion、およびnavigator.platformの用法を監査しなさいページまたはスクリプトは、navigator.userAgent、navigator.appVersion、およびnavigator.platformのうちの最低1つにアクセスしている。クロム101を始めることによって、ユーザーエージェントストリングで入手可能な情報の量が減らされる。
この問題を定着させるためには、navigator.userAgent、navigator.appVersion、およびnavigator.platformの用法を機能検出、進歩的な向上と取り替えるか、またはnavigator.userAgentDataに移住しなさい。
性能理由のためにプロパティのうちの1つへの最初のアクセスだけが示されることに注意しなさい。と出てきます。
header.php<!DOCTYPE html> <html lang="ja"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="keywords" content="共通キーワード" /> <meta name="description" content="<?php bloginfo( 'description' ); ?>" /> <title><?php bloginfo( ‘name’ ); ?></title> <link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/assets/images/common/favicon.ico" /> <link href="https://fonts.googleapis.com/earlyaccess/notosansjapanese.css" rel="stylesheet" /> <link href="https://fonts.googleapis.com/css?family=Vollkorn:400i" rel="stylesheet" /> <?php wp_head(); ?> </head> <body <?php body_class(); ?>> <div class="container"> <header id="header"> <div class="header-inner"> <div class="logo"> <a class="logo-header" href="/"> <img src="<?php echo get_template_directory_uri(); ?>/assets/images/common/logo-main.svg" class="main-logo" alt="PACIFIC MALL DEVELOPMENT" /> <img src="<?php echo get_template_directory_uri(); ?>/assets/images/common/logo-fixed.svg" class="fixed-logo" alt="PACIFIC MALL DEVELOPMENT" /> </a> </div> <button class="toggle-menu js-toggoleNav"> <span class="toggle-line">メニュー</span> </button> <div class="header-nav"> <nav class="global-nav"> <?php wp_nav_menu( array ( 'theme_location' => 'place_global', 'container' => false, ) ); ?> </nav> <form class="search-form" role="search" method="get" action="<?php echo esc_url( home_url() ); ?>"> <div class="search-box"> <input type="text" class="search-input" name="s" placeholder="キーワードを入力してください" /> <button type="submit" class="button-submit"></button> </div> <div class="search-buttons"> <button type="button" class="close-icon js-searchIcon"></button> <button type="button" class="search-icon js-searchIcon"></button> </div> </form> </div> </div> </header> <?php if( is_front_page() ): ?> <section class="section-contents" id="keyvisual"> <?php echo get_main_image(); ?> <div class="wrapper"> <h1 class="site-title">Connecting the future.</h1> <p class="site-caption"><?php echo get_the_excerpt(); ?></p> </div> </section> <?php else: ?> <div class="wrap"> <div id="primary" class="content-area"> <main> <div class="page-contents"> <div class="page-head"> <?php echo get_main_image(); ?> <div class="wrapper"> <span class="page-title-en"><?php echo get_main_en_title(); ?></span> <h2 class="page-title"><?php echo get_main_title(); ?></h2> </div> </div> <div class="page-container"> <?php if ( function_exists('bread_crumb') ){ bread_crumb(); } ?> <?php endif; ?>
functions.php
<?php function my_enqueue_scripts() { wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'bundle_js', get_template_directory_uri(). '/assets/js/bundle.js', array() ); wp_enqueue_style( 'my_styles', get_template_directory_uri(). '/assets/css/styles.css', array() ); } add_action( 'wp_enqueue_scripts', 'my_enqueue_scripts' ); // ヘッダー、フッターのカスタムメニュー化 register_nav_menus( array( 'place_global' => ' グローバル', 'place_footer' => ' フッターナビ', ) ); // メイン画像上にテンプレートごとの文字列を表示 function get_main_title() { if ( is_singular( 'post' ) ): $category_obj = get_the_category(); return $category_obj[0]->name; elseif ( is_page() ): return get_the_title(); elseif ( is_category() || is_tax() ): return single_cat_title(); elseif ( is_search() ): return ' サイト内検索結果'; elseif ( is_404() ): return ' ページが見つかりません'; elseif ( is_singular( 'daily_contribution' ) ): global $post; $term_obj = get_the_terms( $post->ID, 'event' ); return $term_obj[0]->name; endif; } // 子ページを取得する関数 function get_child_pages( $number = -1, $specified_id = null ) { if ( isset( $specified_id ) ): $parent_id = $specified_id; else: $parent_id = get_the_ID(); endif; $args = array( 'posts_per_page' => $number, 'post_type' => 'page', 'orderby' => 'menu_order', 'order' => 'ASC', 'post_parent' => $parent_id, ); $child_pages = new WP_Query( $args ); return $child_pages; } // アイキャッチ画像を利用できるようにする add_theme_support( 'post-thumbnails' ); // トップページのメイン画像用のサイズ設定 add_image_size( 'top', 1077, 622, true ); // 地域貢献活動一覧画像用のサイズ設定 add_image_size( 'contribution', 557, 280, true ); // トップページの地域貢献活動にて使用している画像用のサイズ設定 add_image_size( 'front-contribution', 255, 189, true ); // 企業情報・店舗情報一覧画像用のサイズ設定 add_image_size( 'common', 465, 252, true ); // 各ページのメイン画像用のサイズ設定 add_image_size( 'detail', 1100, 330, true ); // 検索一覧画像用のサイズ設定 add_image_size( 'search', 168, 168, true ); // 各テンプレートごとのメイン画像を表示 function get_main_image() { if ( is_page() || is_singular( 'daily_contribution' ) ): $attachment_id = get_field( 'main_image' ); if ( is_front_page() ): return wp_get_attachment_image( $attachment_id, 'top' ); else: return wp_get_attachment_image( $attachment_id, 'detail' ); endif; elseif ( is_category( 'news' ) || is_singular( 'post' ) ): return '<img src="'. get_template_directory_uri(). '/assets/images/bg-page-news.jpg" />'; elseif ( is_search() || is_404() ): return '<img src="'. get_template_directory_uri() .'/assets/images/bg-page-search.jpg">'; elseif ( is_tax( 'event' ) ): $term_obj = get_queried_object(); $image_id = get_field( 'event_image', $term_obj->taxonomy. '_'. $term_obj->term_id ); return wp_get_attachment_image( $image_id, 'detail' ); else: return '<img src="'. get_template_directory_uri(). '/assets/images/bg-page-dummy.png" />'; endif; } // 特定の記事を抽出する関数 function get_specific_posts( $post_type, $taxonomy = null, $term = null, $number = -1 ) { if ( ! $term ): $terms_obj = get_terms( 'event' ); $term = wp_list_pluck( $terms_obj, 'slug' ); endif; $args = array( 'post_type' => $post_type, 'tax_query' => array( array( 'taxonomy' => $taxonomy, 'field' => 'slug', 'terms' => $term, ), ), 'posts_per_page' => $number, ); $specific_posts = new WP_Query( $args ); return $specific_posts; } function cms_excerpt_more() { return '...'; } add_filter( 'excerpt_more', 'cms_excerpt_more' ); function cms_excerpt_length() { return 80; } add_filter( 'excerpt_mblength', 'cms_excerpt_length' ); // 抜粋機能を固定ページに使えるよう設定 add_post_type_support( 'page', 'excerpt' ); function get_flexible_excerpt( $number ) { $value = get_the_excerpt(); $value = wp_trim_words( $value, $number, '...' ); return $value; } //get_the_excerpt() で取得する文字列に改行タグを挿入 function apply_excerpt_br( $value ) { return nl2br( $value ); } add_filter( 'get_the_excerpt', 'apply_excerpt_br' ); // ウィジェット機能を有効化 function theme_widgets_init() { register_sidebar( array( 'name' => ' サイドバーウィジェットエリア', 'id' => 'primary-widget-area', 'description' => ' 固定ページのサイドバー', 'before_widget' => '<aside class="side-inner">', 'after_widget' => '</aside>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>', ) ); } add_action( 'widgets_init', 'theme_widgets_init' ); // メイン画像上にテンプレートごとの英語タイトルを表示 function get_main_en_title() { if ( is_category() ): $term_obj = get_queried_object(); $english_title = get_field( 'english_title', $term_obj->taxonomy. '_'. $term_obj->term_id ); return $english_title; elseif ( is_singular( 'post' ) ): $term_obj = get_the_category(); $english_title = get_field( 'english_title', $term_obj[0]->taxonomy. '_'. $term_obj[0]->term_id ); return $english_title; elseif ( is_page() || is_singular( 'daily_contribution' ) ): return get_field( 'english_title' ); elseif ( is_search() ): return 'Search Result'; elseif ( is_404() ): return '404 Not Found'; elseif ( is_tax() ): $term_obj = get_queried_object(); $english_title = get_field( 'english_title', $term_obj->taxonomy. '_'. $term_obj->term_id ); return $english_title; endif; } function set_revision_store_number($num){ return 3; } add_filter( 'wp_revisions_to_keep', 'set_revision_store_number');
page.php
<?php get_header(); ?> <div class="page-main"> <div class="lead-inner"> <?php if(have_posts()): while(have_posts() ):the_post(); the_content(); endwhile; endif; ?> </div> </div> <?php get_footer(); ?>
フォーラム: 使い方全般
返信が含まれるトピック: SSL証明書の取得とURLの置換を行う際にエラー