0

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.

1 Answer 1

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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