How to Create WordPress Custom Forms and Fields

One of the most talked about features of ClassiPress 3.0 is the ability to create your own custom fields and forms. This cool new feature will make it easy for you to have a different form for each category.

For example, say you have a WordPress category called “Cars” and you want to have fields called “Year”, “Make”, and “Model” that are all drop-down lists. No problem. Just create each custom field, add the drop-down values, and then add those fields to your “Cars” custom form layout. That form will only display when someone is posting a new ad under the “Cars” category.

In this video demo I show you how to create a custom form for a category called “Electronics”. Then you’ll see how it dynamically shows up on the ad form page. It’s that easy to create your own forms and fields all from within the WordPress admin.

Your rating: none
Rating: 5 - 1 vote

 Comments (52)

  • Darryl

    Absolutely Awesome. If this only a tease to what is to come. Version 3.0 is going to be insane. Great job!

    • elliott wave

      yes, 3.0 will be the best classified themes with premium features.
      cant wait for it release.

  • Susi

    Totally Awesome, I can’t wait to work with this and customize my site with these form fields. I know there will be issues, however, this is a GREAT start.

  • Carlos Takemura

    Very exciting, great work! It has answered a few of my questions. One thing I’d like to know is will there be an option to charge people before they create their listing?

    I don’t really want people hogging bandwidth messing about uploading photos etc.

    • David

      Nope. They need to be registered on your site before they can post an ad though. I doubt people will be uploading images on your site just for the heck of it. You can also limit the file size and # of images per ad if you’re really worried about bandwidth usage.

  • peter


    lpavlou likes this.
  • Carlos Takemura

    David, I just want to expand a bit on my earlier comment re: people paying to list before creating their listing.

    I can just see on popular sites how people wasting time adding listings and not paying, how annoying it would be for the site owner, and indeed resource intensive. And with WP being the platform, even more so as it’s not exactly lean in that department!

    I would much prefer to take payment from people prior to them listing, so wonder if this could be done at the ‘register’ stage?

    – Customer registers with their basic details then pays
    – Customer then receives a verification email along with their password
    – Customer follows link which takes them to a page where they can
    start creating their listing

    I’ve seen this done on other sites (non WP) and here’s a nice example of a site which takes payment BEFORE the customer can upload their photos (final stage):

    I can see why they’ve done it this way, very smart.

    I am currently compiling a list of questions (and suggestions) which I plan to post in the forum (not pre-sale questions as I’ve recently purchased your theme!)

    • David

      I disagree with paying before submitting a listing. You want to have the least amount of hurdles possible. Asking for a payment upfront will deter potential customers. If you first get their name & email address and they don’t end up buying an ad, you can at least follow-up and market to them later.

      I appreciate all your other comments and suggestions Carlos. Your input has helped me better think things through while developing 3.0. Just because I don’t reply to every comment doesn’t mean I didn’t read it. Keep the feedback and comments coming.

  • Greenlife

    A very nice and useful feature you added to 3.0!
    Does this work to make search forms as well?

    • David

      Thanks Greenlife. Yes, I’m working on a solution for creating custom sidebar search forms. It might be 3.0x though.

  • anunturi

    hi david,
    when you will release the 3.0 version because in the earlier version is a bug in the post page. after 1200uv/day it appears some problems that blocks the server.
    my site is down for 2 months. hope that 3.0 has a new code:)
    p.s. can i be a beta tester?

    • David

      Can you show me an example of the bug after 1,200 page views a day? A 3.0 beta should be ready by the end of Feb.

  • anunturi

    i can’t show the bug because i’m not an expert. the bug creates big sql queries that block the server. dunno how to explain, but some programmers told me that in the post page, in certain condition, it creates an infinite loop. (but they couldn’t find the problem.)

    • David

      Well, it’s hard to troubleshoot without an example or error message. 😉 3.0 has been completely rewritten and should not have that problem.

  • Annonce Gratuite

    Very nice jobs, cant wait ^^

    May facebook connect possibility in 3.0? could be a nice featured 😉

    Thanks for this nice video ;D

  • Carlos Takemura

    I’m not using CP for any of my sites yet, but I am using WP to run a listing site and I’m uncertain about using WP generally as I feel it’s very resource hungry, especially if using for non-blog type sites with a lot of content.

    We’ve had trouble with our VPS going down on various occasions throughout the day although I haven’t gotten to the bottom of the problem, I’m convinced it’s a WordPress problem.

    • David

      I run several WordPress sites with large amounts of traffic and have had very little problems. There are also many large companies who use WP as their main site. WordPress itself is most likely not the problem especially if you are using a cached plugin. Slowness or downed WP sites tend to be caused by:

      -A way too crowded shared hosting provider which in turn slows down your site
      -A poorly managed VPS hosting provider (you get what you pay for)
      -WordPress plugins that are poorly written and make too many trips to the database

      If you aren’t already using the WP Super Cache plugin I highly recommend installing it. Basically it caches all your pages so they are static and don’t require trips to the database when a page loads.

      There are some hosting providers I recommend like Blue host and Host Gator which have been wonderful for my sites.

    • Greenlife

      Some plugins aren’t made to run together. The corporate site of the company i’m working at the moment had the same problems. They thought it was the high number of categories (248) and the number of posts, but it can’t be that because WP is built just to do that. It could be a plugin problem

      14 plugins installed is just asking for problems. Try to de-activate the plugins one by one to see where the problem is. Now we’re only running with 7 and it works fine.

  • anunturi

    thanks for the response david.
    hope that 3.0 will be launched this month. i’m waiting it for 2 months:)

  • George

    David, Carlos…need to know urgent, please I want to buy the Professional pack, as I have a need to develop several sites…but I need several payment options for my sites…say from…FREE, with an expiry date say 7 days…and then X for 1 mo and so on… as you have not included these in your new version 3…can I employ a programmer to install them into the site when I buy it…and more importantly, how would this affect the licensing. This is very important for my decision, and I would be grateful for an early reply???
    Can I call you in SF to discuss, if so, plz send your no. and best time. I am from Sydney, Australia.

    • David

      George, modifying the ClassiPress code after you have purchased it is within the license terms so that’s fine if you want to hire a developer to do those changes. Just keep in mind that once a newer release comes out you’ll have to be careful when upgrading.

  • pedrox

    I hope that the “wpclasspress 30” includes a menu of layers at the top, allowing the inclusion of external links… 🙂

  • George

    Frustrating trying to communicate with this company…they never reply to emails.

    • David

      George- I’ve got your email in my queue and just haven’t had a chance to respond yet. It’s been a busy week so my apologies. I’ve responded to your comment above, however.

  • Ryan

    I noticed “size” was a required field. Is that really going to be the case?

    • David

      Nope. You get to choose which fields are required. There are the “core” post fields like description and title which will always be required though.

  • iPablo

    Hi David,
    I have watched the conversation regarding the launch of the Classipress 3.0.
    I am looking forward to the upcoming release! 🙂

    I would like to make some minor adjustment to the template when I purchase it.
    I would like to add more of the sociable plugins that are available, such as the Facebook Connect plugin.

    I would also like to change the frontpage a bit, to have more focus on the most used categories with shinny icons.

    o My question is, would I or the developer who make this changes, be able to upgrade the template when you release future upgrades, without making the whole site to crash?

    o And my last question: WHEN (aprox.?) are you going to release the 3.0 upgrade? 🙂

    Looking forward to receive your answer.

    • David

      If you are just modifying the front page it won’t affect any updates. 3.0 will be very flexible.

      3.0 beta should be ready by the end of the month. Then after a few weeks of testing and bug fixes, it will roll out in March.

      I know you are all anxious to get your hands on 3.0 but let me tell you — I can’t wait to finish it! 😉

  • Carlos Takemura

    David, I recently purchased your theme and tried to join/login on forum but couldn’t.

    Anyway, I wanted to document an idea I have in the forum so it’s there for people to support or dismiss it, and hopefully encourage you to explore it, perhaps as a stand alone premium add-on.

    I recently offered as a great example of a stylish classified site, it’s very niche. One of its strengths is in the filtering of results. As a user, I love sites that offer this when there’s a lot of content. Presumably, as Classipress owners we all want people to sign up and post classifieds on our site? The more content, and variety of content, will necessitate good filtering controls allowing the user to drill down their interests.

    The idea is that user will select a category and see results output by the category.php page, in the sidebar will be associated criteria allowing the user to drill down further.

    Pretty standard stuff these days on the top listing sites (and even not so ‘top’ ones too)

    But the question is, how to achieve this with WordPress?

    You could use custom fields but that might be messy, especially if using custom fields to store other types of information, which may not require filtering.

    The other method would be to use tags but they’re too loose, liable for redundancy through duplication and cannot be grouped.

    I think the answer lies in WP’s recent ability from 2.8 onwards, to create custom taxonomies. Using this, we could set up groups however we like, as many as we like, and add as many tags (attributes) to each of the relevant groups.

    For those not familiar with this WP feature, then pop over to Justin Tadlock’s post here:

    This really unlocks some huge potential for Classipress.

    There’s also a plugin to easily create custom taxonomies by the reliable Yoast, called ‘Simple Taxonomies’. It does the same thing as Justin’s code example but through an interface in your dashboard.

    Effectively, it offers a way to group tags as you will see in Justin’s example of a movie database.

    I presume many Classipress owners will be looking to set up niche classified sites and in this scenario custom taxonomies are a must!

    Say you had a classified site dedicated to used or vintage cameras. You could set up categories for the brands, then use a series of custom taxonomies for various attributes such as: year, condition etc

    Users, when browsing through lists of Canon cameras, for example, could then see associated attributes (tags) in the sidebar, provided by the custom taxonomies function. Only attributes matching that category would be shown, so if there’s no Canon cameras in ‘excellent’ condition, then don’t show that attribute as a filter. If this cannot be done, then at least show item count as zero in parenthesis.

    When posting an ad, the lister would be presented with associated custom taxonomies and their attributes, which the site owner would have predefined. These could be displayed either as drop downs, or as check boxes for instances where more than one tag could be applied (particularly in real estate)==[p.

    I think normal tagging, and allowing listers to tag their own ads, is not a wise decision as it leads to too much noise, and in a lot of cases redundancy.

    There was recently a post on Woorkup about the Death of Tag Clouds (look it up, it’s spot on!)

    So, by using custom taxonomies, and creating groups for your predefined tags, allows for a much more streamlined and tighter process with the added benefit of being able to use this powerful technique to create filtering functionality for your site, thus increasing the value of your site and benefiting your advertisers (the listers). Everyone wins!

    Personally, I think this technique should be built in to CP 3.0, if it hasn’t been already. Otherwise, it would be a great add-on, or plugin.

    • David

      Why aren’t you able to login to the forum? You should get an activation email with a link to verify your account after you register. Maybe you have cookies disabled or javascript?

  • Carlos Takemura

    David, I’ve just had another look at your screencast for the custom forms and fields in the ongoing research for my project.

    I am planning to devote categories entirely to geographical locations and then use custom taxonomies (i.e. groups of tags) for secondary attributes such as accommodation type, setting, interests, style etc.

    Given your example above, it’s custom taxonomies I would like to use to invoke specific forms and not categories.

    So, instead of the lister choosing a category then seeing a custom form, I would like them to choose from a predefined list of tags. I my case that would be types of accommodation as, for example, a houseboat would have different attributes than an apartment.

    Is this possible?

    Also, by using custom fields to store specific attributes for items, can this technique then be used for filtering results as I described in my previous post?

    David, you’ve probably guessed by now that I am obsessed, with good reason, for the need to filter results on the archive pages such as category.php and tag.php etc 😉

    I’m happy to provide some examples sites using this technique but I cannot access your forum, despite having purchased a copy of CP.

    • David

      Going the custom taxonomies approach will mean you need to hire a developer to make some serious changes to CP. Instead, you can essentially solve that problem by using the new custom fields feature as they will be what users can filter their results off of.

      For example, you’ll create a drop-down list called “Region” and your values could be “Bay Area”, “East Bay”, “North Bay”, etc. Not only will it be on new ad forms, the user can also narrow down their search. It will make more sense once I get 3.0 finished up and working demo.

      • Carlos Takemura

        David, I’m not sure that custom fields for certain values is a wise choice for classifying stuff when you have custom taxonomies at your disposal.

        I don’t see how using custom fields would give you as much control.

        So, it seems you are devoted to the custom field approach so I have a few questions:

        1. Can the user select more than one value from the drop down?

        2. Can certain custom fields be grouped together?

        3. Can custom fields give you the option of creating deeper hierarchical levels?

        4. Can custom fields display an item count?

        5. Can you provide a description for each custom field, good for on page SEO?

        6. How can I globally change custom fields from the dashboard?

        7. How do custom fields show up in your URL structure?

        By using custom taxonomies all of the questions can be answered positively.

        I don’t think custom fields can offer this without some hard coding here and there, and they certainly can’t give you control over creating deeper hierarchical levels, which many users will want.

        Sure you could categories for this but again, I don’t think it’s wise to mix certain categories as it can become unmanageable.

        I see many premium theme using categories for ‘featured’ content and ‘blog’ – it’s just messy.

        In your example above, why would you use custom fields to store values for ‘region’? What would those regions be associated with? A country? A state? And how would I then create a deeper level of associated ‘neighborhoods’ – it wouldn’t work unless I am missing a vital point about custom fields.

        Your example would work perfectly if you used custom taxonomies, for all of the reasons I list in my questions.

        So, are you telling that 3.0 will not utilise the power of custom taxonomies at all?

        For those reading this who are not sure why I am eager to see custom taxonomies in CP, it’s like tagging but with the added bonus of being able to group those tags, AND create hierarchical levels of tags.

        David, if CP 3.0 doesn’t support CT, then perhaps I’ll need to wait for 4.0 when people realise the cul de sac they’re in using custom fields for certain sites.

  • Greenlife

    Is the admin capable of publishing classifieds from the backend? Or from the frontend, but free offcourse ;)?

    • David

      The best way is to submit the ad from the front-end since all the correct fields and triggers are set that way. Eventually I’d like to build a back-end version but it’s not a top priority.

  • Prototype

    David, thank you for the continued hard work on creating version 3.0. I have two questions.

    1. Will a directory style option be available? A directory style setup like is something many of your customers including me will want if we plan to have many categories and catering to many cities and states.

    2. We will a have paid categories option? I would like to charge for certain categories.

    Thanks for all the wonderful work!

    • David

      Thanks Prototype. Yes and yes. Like I mentioned on the other blog post, you can currently have price per categories or even set certain ads to free.

  • Carlos Takemura

    @prototype has filtering options in the left sidebar, which makes it a very useful site if you have lots of content, which lets face it, we are all hoping for 😉

    I am eagerly awaiting 3.0 so that I can evaluate it for our needs. I would love to hear what plans David has for implementing filter functionality as described in my earlier posts.

    • David

      I like as well. 3.0 won’t have such advanced filtering options but it will be better than the current version. Remember, when 3.0 comes out it doesn’t mean there won’t be more releases. Each version builds on top of the previous one so it will only get better. 😉

  • Carlos Takemura

    David, I figured 3.0 wouldn’t have such advanced filtering as olx, especially if you’re relying solely on custom fields for this. But it’s heartening to hear that each version will build upon the last.

    But be careful about giving to much good stuff away for free, especially as many will be using your theme to simply scrape listings from other sites, and other such mindless capers. Perhaps look at the Gravity Forms model of creating add-ons and not bloating the core of CP.

    • David

      Good idea and I’ve seen gravity forms…it’s very cool.

      There will be add-ons available…mostly related to payment gateways. I’m also working on a free downloadable trial that expires after 30 days.

  • Christian Chords

    If I buy the current version now, will I get the future version free ?

  • tim

    Hi David,

    Great work! Hopefully Classipress will become the only sensible choice for classifieds within wordpress. I would love to see your project continue prosperously and hopefully became rewarding.

    David I have one issue regarding version 3 screen-shots/cast. Will classipress version 3.0 be able to function like version 2.9.3 when it comes to selecting a category when ‘posting an advert’?

    Can it have one generic form for all categories … regardless whichever category you select? Like how it works and functions in version 2.9 x. David I have a modified classipress with multiple select categories where users can add to more than one category and even search more than one category.

    Okay i understand that i will be modifying it again … however this time in version 3, the core structure will no longer work with my set-up? Can you please clarify this?

    • David

      Thanks Tim. Yes, 3.0 can have just one generic form to cover all categories. That’s what the default is if you don’t want to have all different types of forms.

      That is correct. If you’ve modified your existing CP to allow for multiple cats, you’ll have to do the same to 3.0.

      • tim

        Thanks David, So its doable then. Great! I do find it strange that no scripts out there offer an option to search multiple cats and post adverts to multiple cats a via multiple select box. David would be great if you could implement that option … would make my life easier. Btw when is 3.0 due out?

  • WordPress Classified Ads Sites Powered by ClassiPress | An Internet Entrepreneur’s Journey

    […] could create custom forms and fields in WordPress to accommodate this, but it would be nice if there was built-in email address masking, […]

Discussion is closed.