Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a couple of categories that don't contain any posts (yet). What I would like to do is have a form which takes users details for future posts.

Am I right I thinking I simply edit the page which displays the current search bar.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

In your category.php ( or custom taxonomy archive template ), you should add the form code in the else case of your check if there are posts

e.g.

if(have_posts()){
    // do the post loop
} else {
    // display a form that takes user details for future posts
}

If there is no category.php you can copy and rename your index.php, and you can do the same for individual categories, e.g. category-example.php will be sued instead of category.php for the example category

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.