このプラグインは WordPress の最新3回のメジャーリリースに対してテストされていません。もうメンテナンスやサポートがされていないかもしれず、最新バージョンの WordPress で使用した場合は互換性の問題が発生する可能性があります。

Mend Sticky Posts

説明

  • Sticky posts are ordered the same way as non-sticky posts.
  • Sticky posts do not reappear on subsequent pages.
  • The first page of home will contain exactly the requested number of posts, rather than the requested number of posts plus the number of sticky posts.
  • Allows more than one page of sticky posts.

Simply injects the sticky post IDs into the actual mySQL order by clause,
causing posts to be ordered by sticky status then by what ever order is
specified, usually post_date DESC, and not to repeat on subsequent pages.
I can’t actually figure out why it isn’t done like this by WP, perhaps
earlier versions of mySQL don’t support this. WP’s default sticky ordering
craziness is turned off by returning an empty array for the next call to
get_option(‘sticky_posts’) which happens in WP_Query->get_posts().

There is currently a ticket awaiting review on the WordPress trac system to roll this functionality into the WordPress core: https://core.trac.wordpress.org/ticket/21986

インストール

  1. Upload mend-sticky-posts.php to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. That’s it!

評価

このプラグインにはレビューがありません。

貢献者と開発者

Mend Sticky Posts はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。

貢献者

“Mend Sticky Posts” をあなたの言語に翻訳しましょう。

開発に興味がありますか ?

コードを閲覧するか、SVN リポジトリをチェックするか、開発ログRSS で購読してみてください。

変更履歴

1.1

  • Functionally closer to core code.
  • Now only run on “home” queries.
  • Only run if ignore_sticky_posts isn’t passed to WP_Query.
  • Bugfix: Doesn’t add comma when order by clause is already empty.