0

私がやろうとしているのは、サイトのユーザー向けにフロントエンドのプロフィール ページを作成することです。

私が試していた方法の 1 つは、次のようにカスタム更新プロファイル ページを作成することでした: ( http://4rapiddev.com/php/create-custom-update-profile-page-for-wordpress-users/ )。登録ユーザーのみがそのページにアクセスできるように設定することができました。

さて、難しい部分です(少なくとも私にとっては)。特定のカスタム投稿タイプ (この場合は「バッジ」) を個々のユーザーに関連付ける方法を見つける必要があります。そうすれば、特定のユーザーがそのページにアクセスすると、それらのバッジが表示されます。

別の方法として、ユーザーが登録されるたびに新しいページを作成する方法も考えていました。その新しいページにはユーザーと同じ名前が付けられ、WP-Admin でユーザーのプロファイルを表示することで通常得られる情報を取得できます。カスタム投稿タイプをページに関連付けることができるプラグインを見つけることができました ( http://wordpress.org/extend/plugins/custom-post-types-relationships-cptr/ )

私は両方の方法を調べてみましたが、両端で手ぶらで出てきました。誰かが私を助けたり、正しい方向に向けたりできますか?

4

1 に答える 1

0

As far as I can understand, you are asking (in the first part of your message) how to associate a user to a custom post type, right? Since every post need to have an owner, I guess you can think these badges as custom posts and the users as the owner of these posts. You can list these custom posts automatically in the profile of every user. What else is missing, if you follow this logic?

于 2012-08-17T22:04:06.837 に答える