Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
453 views
in Q2A Core by
Is there any possibility to redirect users to certain categories based on cookies or database stored preferences?

Is there any possibility to list cretain questios based on users preferences?

Ty in advace.
Q2A version: 1.7
by
May be possible by custom plugin.
by
You can make a plugin then do a PHP redirect in the qa-plugin.php file, using qa_get_logged_in_userid() and matching database calls, or cookie checks .

To filter question lists you'd probably have to recalculate them in a theme before displaying them, modify the core, or make custom pages where you calculate filtered lists yourself.

1 Answer

0 votes
by
As others said a plugin is probably the way to do this. Depending on when you want to redirect users an event plugin might work. For example, you could target the "u_login" event so when they log in they go to the correct category.

Check against qa_get_logged_in_userid() to redirect specific users, then called qa_redirect() with the appropriate path. You might want to make yourself an admin form where you can enter user IDs and the categories they belong to, and store that in an option.

For filtered questions Onurb is correct, you'll need a page plugin that fetches posts according to your own criteria, then displays them on the page.

Welcome to the Q&A site for Question2Answer.

If you have a question about Q2A, please ask here, in English.

To report a bug, please create a new issue on Github or ask a question here with the bug tag.

If you just want to try Q2A, please use the demo site.

Categories

...