このウェブサイトは販売用です! kys-lab.com は、あなたがお探しの情報の全ての最新かつ最適なソースです。一般トピックからここから検索できる内容は、kys-lab.comが全てとなります。あなたがお探しの内容が見つかることを願っています!
このウェブサイトは販売用です! kys-lab.com は、あなたがお探しの情報の全ての最新かつ最適なソースです。一般トピックからここから検索できる内容は、kys-lab.comが全てとなります。あなたがお探しの内容が見つかることを願っています!
ワードプレスでマルチサイトの子ブログから、記事を読み込んで親ブログに表示する。 ワードプレスのネットワーク機能で、複数のサイトの記事を一つのサイトに表示するには、 を使いますが、この方法だと各サイトごとに記事を表示することになります。 3つのサイトから最新記事を10件表示させたい時などは、直接データベースにアクセスして記事を呼び出す必要があります。 その時には < ?php global $wpdb; $blogs = array(2,3,4);//ブログのID $count = count($blogs); $sql = ''; for ($i = 0; $i < $count; $i++){ $blog = $blogs[$i]; switch_to_blog($blog); $sql .= <<< HERE (SELECT *, $blog as blog_id FROM $w
[2013-07-15追記] WordPressマルチサイトからの記事の取得に関しては、WP Over Networkプラグインの開発協力という形で継続しています。そのため、当記事のコードはアップデートされません。最新版に対応した形で実現したい方は、WP Over Networkプラグインをお使いください。 WP Over Network をリリースしました。 | Foreignkey, Inc. WordPressをネットワーク化し、1つのWordPressで複数のサイトを管理している際に、ネットワーク全体の新着記事を表示するためのコードです。以前ブログに投稿したコードがありますが、get_blog_list()がWordPress3.0から非推奨になったため、get_blog_list()を使用しないように変更した修正版です。 また、各サイトから1件を取得して並び替える実装だったのです
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く