1. 俺 の フック が こ んなに ore no hook ga konna ni kantan na wakega nai. 簡単 な わけ がない。 WordBench KOBE #21 2. こんな説明みたことありませんか? 抜粋の [...] を消すには、functions.phpに以下のコードを コピー&ペーストしましょう。 function new_excerpt_more($more) { return ''; } add_filter('excerpt_more', 'new_excerpt_more'); 3. これ、実は「フック」といいます。 抜粋の [...] を消すには、functions.phpに以下のコードを コピー&ペーストしましょう。 function new_excerpt_more($more) { return ''; } add_filter('e
WordPressはデフォルトで各種フィードが出力されます(フィード – Wikipedia)。 注意したいのは「一見ブラウザから見えなくても生成されている」という点です。 自分の覚え書きになりますが、WordPressの生成するフィードとその制御方法をおさらいしておきます。 WordPressの生成するフィード 一口にWordPressのフィードと言っても、配信される範囲(投稿、コメントなど)とフィードの形式(RSS 2.0、Atomなど)とによって分類されます。 本家Codex:WordPress Feeds(日本語Codexにもありますが、差分があるので本家Codexのみ紹介します) Codexに載っている情報からWordPress 3.4.2において生成されるフィードは以下になります。 ★サイト全体(post_type=post) ★コメント(サイト全体) コメント(投稿単位) カ
案件によっては、フィードの内容から、逆に不要な情報が流れてしまい、読めないようにしてしまいたい場合もあります。 そのような場合に、フィードの配信を止めてしまう方法を紹介します。 htmlのソースからフィード関連のlink要素を削除する CODE 1 remove_filter( 'wp_head', 'feed_links', 2 ); remove_filter( 'wp_head', 'feed_links_extra', 3 ); head内のフィードURLを出力しているlink要素を削除するには、CODE 1でwp_head への2つのフックを停止させます。(feed_linksは、ブログ全てとコメントのフィード、feed_links_extraは、カテゴリーや投稿など条件に応じたフィードのlink要素を出力します。また、rsd_linkを削除している記事もありますが、これはxml
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く