INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Custom post type help

Custom post type help

(OP)
I need to add a facility to our company website, kind of like a directory but searching around no directory does what we need without lots of modification. I have created custom post types before but with just a title and text field, nothing like this.

Here's what we need to achieve

The admin page needs to have

title
description (main wysiwyg)
address {text}
town {text}
telephone {text}
url {text}
lat long values {text}
opening hours {text}
main image {featured image} (600 x 450)
up to 4 other images (200 x 150 thumbs opening up into the featured image space)
comments can be added to each listing
checkboxes for which facility it provides i.e. large shop, small shop, online, manufacturer, distributor etc (15 in total)

Someone needs to be able to search the website by

either completing the title in the search field
choosing a category (or multiple, for the eg above they may want an online manufacturer)
the search results should show the featured image (thumbnail at 200 x 150), title and snippet from description
clicking through goes to the main listing page

Is this best achieved through a custom post type, how do I write one to generate all the fields above and let me search on them?


RE: Custom post type help

Use custom fields (post meta) and write a set of display functions in the template function list to display is what I've found easiest.
That way you don't need to worry about search too much because the meta data can be included in the standard WP search with one plugin >> http://wordpress.org/plugins/post-meta-searcher/



Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close