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've been sitting on this for three days and I still haven't figured out a good way to solve this problem—that's why i want to ask a community about it.

I'm creating a page, which will have some historical routes in my city. I therefor need to create a custom post-type, which will be the route.

Route have points. Each point store multiple data: name, content, GPS-coordinates, author, etc.

So I need to create a repeatable area called point and there I'll insert all the data I need (amount of points is dynamic so this area need to be repeatable).

I've done that with help from this question: Create more Meta Boxes as needed

It works fine, but there's a problem because the content-field needs to be the TinyMCE-editor and for now I'm stuck on the part where i add a repeatable area through jQuery, because I can't add TinyMCE to it in a easy way.

Is this a good plan or should I try another solution?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

If Points have such a complex structure then shouldn't you think of it as another custom post type, and associate them to a Route (or to several Routes)? that way you could have a Point in different Routes, which could be a reasonable expectation.

share|improve this answer
    
Thats a good idea. I will reconsider changing to this becouse atm i used WPAlchemy class to setup repeatable fields including WYSIWYG editor. –  Charles Kłyciński Oct 29 '12 at 11:51
add comment

That could be easily achieved with Advanced Custom Fields attached to a simple custom post type of yours using the Repeater field which can contain infinite sets of field of any type. ( WYSIWYG included. )

I can understand how a solution using default meta-boxes would be more desired but Advanced Custom Fields provides a great/simple UI for the back-end and unlimited possibilities for the front-end.

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.