• is it possible to allow users to save preferred custom categories in their profile and when they log in they get content based on their preferences.

    I am actually using a custom theme that displays events and i want my users to get a list of upcoming events based on their preferences (categories or tags they choose) when they log in .. You can have a look at my beta version here eventsindu.com/beta

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Yes.

    You probably want to know how as well ??
    The only good section on the profile page to add fields is Personal Options. Hook the action ‘personal_options’ and echo out table rows for you added fields. Then hook the action ‘user_profile_update_errors’. Save the value in $_POST associated with your field names in usermeta. You can get the user ID from the user object passed as the third parameter.

    To affect the results shown based on the saved preferences, hook ‘pre_get_posts’ action and set query vars associated with the saved preferences. Be sure to only do this for the home page when the user is logged in or the preferences will be applied to every single query.

    Thread Starter mnkhalid

    (@mnkhalid)

    Hi
    Thanks for your reply ..i am just a beginner to wordpress and coding ..and it seems ill have to do some learning before i can implement your method. I can definitely do that as after searching all the web i could not find a plugin or a readymade solution for it. Thank you ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘custom content for users’ is closed to new replies.