user3595293
user3595293

Reputation: 115

Wordpress force user to fill the form before view any site content

I'm very new in wordpress. I'm in a big trouble. My client need a starting page(form) for a website before any page content loads. Only After the verification of this form , user will allow to view any content. Somebody please help me. I don't know how to start this. Please help me.Thanks in advance.

Upvotes: 0

Views: 684

Answers (2)

IntensiveWordpress
IntensiveWordpress

Reputation: 36

Create a custom page template that sets a cookie. Then in header.php, check for the cookie and if it is not set, redirect to the custom page. Be sure NOT to use header.php in the validation page.

Upvotes: 2

Alfred Huang
Alfred Huang

Reputation: 18235

You can process the form data to a cookie field, i.e. when the require form was submitted, set a flag in cookie.

Then, in your 'init' hook, check the cookie flag to decide whether to show the starting page or the content.

Upvotes: 0

Related Questions