Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/remakedevteam/custom-news-blog-settings/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
WordPress サイトに「お知らせ(news)」「ブログ(blog)」の2カテゴリーを導入し、それぞれ専用のリスト・詳細テンプレートと管理画面からの表示設定を提供するプラグインです。
主な機能
- 有効化時に
news/blogカテゴリーを自動作成(既存があれば上書きしない) - お知らせ一覧ページにブログ記事も最新順で混在表示(タイトルに接頭辞・囲み文字を付与)
- カテゴリーごとに専用テンプレート(子テーマでの上書き対応)
- 管理画面(投稿 → ニュース・ブログ設定)から以下を設定可能
- 1ページの表示投稿数
- 日付フォーマット
- ブログ一覧の本文表示文字数
- お知らせ一覧でのブログ記事タイトル接頭辞・囲み文字
動作環境
- WordPress 5.0 以上
- PHP 7.0 以上
インストール
- 本リポジトリを ZIP でダウンロード、または
git clone - プラグインフォルダを
wp-content/plugins/配下に配置 - WordPress 管理画面の「プラグイン」から有効化
- 「投稿」→「ニュース・ブログ設定」で各種設定
ディレクトリ構成
custom-news-blog-settings/
├── news-blog-manager.php # メインプラグインファイル
├── readme.txt # WordPress.org 形式の readme
├── css/
│ └── news-blog-style.css # フロント用スタイル(news/blogページのみ読込)
├── includes/
│ └── template-loader.php # テンプレート切替・ヘルパー関数群
└── templates/
├── category-news.php # お知らせ一覧
├── category-blog.php # ブログ一覧
└── single-category-news-blog.php # 詳細ページ
子テーマでのテンプレートカスタマイズ
子テーマのディレクトリに同名ファイルを置くと、そちらが優先されます。
category-news.phpcategory-blog.phpsingle-category-news-blog.php
ページネーションをカスタムテンプレートで使う場合は、news_blog_pagination() ヘルパーが利用できます。
<?php news_blog_pagination(); ?>
バージョン
現在 1.2.0 — 詳細は readme.txt の Changelog を参照
ライセンス
GPL v2 or later
Releases
3 releases.
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.