Documentation: The "Exclude a taxonomy term from sitemap" code doesn't do anything
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- wordpress
調査の方向性
docs/features/xml-sitemaps/api.md から始め、報告された挙動に照らして、記載されている wpseo_exclude_from_sitemap_by_term_ids の例を確認してください。issue で挙げられている関連フィルター(wpseo_sitemap_entry を含む)を調査し、その後、タクソノミー用語を除外するために記載されている方法が正確でテスト可能になるよう、ガイダンスを更新または削除してください。
索引モデルが issue の本文から書いたものです。
説明
Please give us a description of the issue
On https://github.com/Yoast/developer/blob/main/docs/features/xml-sitemaps/api.md you give a function for removing taxonomy terms from site maps.
I've aadded the following code to my theme functions.php:
function sitemap_exclude_terms( $terms ) {
return [208];
}
add_filter( 'wpseo_exclude_from_sitemap_by_term_ids', 'sitemap_exclude_terms' );
Posts in category ID 208 are still appearing on my post-sitemap.xml. I know it's not a caching issue because I subsequently added a test post and it appeared in the sitemap immediately. I have tested this with numerous different categories and with including single or multiple IDs in the array.
The code should probably either be corrected or removed.
- [X ] I've read and understood the contribution guidelines.
- [X ] I've searched for any related issues and avoided creating a duplicate issue.
UPDATE: The only way I was able to actually successfully filter the sitemap was using the wpseo_sitemap_entry filter. Filters I tried that didn't seem to ever run: wpseo_exclude_from_sitemap_by_term_ids, wpseo_sitemap_exclude_post, and a query with wpseo_sitemap_posts_query. Some sort of clearer documentation might have saved me some time.
- 主要言語
- JavaScript
- スター
- 15
- フォーク
- 23
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Yoast/developer のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
Typosオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
Yoast/developer の issue をすべて見る
似ている issue
-
bug release:v5.56
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Jason-Vaughan/TangleClaw#2270 ·
メンテナーはふだん 1 日以内に返信
-
priority: medium tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
LeeAdcock/robocodeJs.com#411 ·
メンテナーはふだん 1 日以内に返信
-
status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
mastra-ai/mastra#26635 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
chore good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pedrorchagas/blog-api#21 ·