Hi support,
I am trying to get an ordered list of elements as a Custom Type into a content template. A taxonomy would be the wrong thing, as the ordered list contains elements that are unique for one page. However, I would love to use the "Multiple Lines" Type but don't know how. I also know, I can use the WYSIWYG editor, or Multiple Lines, but here are my thoughts:
WYSIWYG:
Easiest way to get an ordered list. However, a user is allowed to insert much more, which he should not. I want to restrict it to plain text in an ordered list.
Single line as repeating field:
We got plain text, the user can add multiple elements. Exactly what I want to do. But there is one downside: It is very uncomfortable to use for my case, and the single line field is not long enough for some bullet point texts. I also know how to get this in a Content Template.
Multiple lines:
Looks like what I want to get - only plain text allowed, comfortable to edit. But the output is separated by <br> line breaks. Is there a search&replace function to get <br> to
?
Or is there a best practice for unsorted / ordered list items?
Best,
Stefan
OK, quick update: I need an sorted list with a sub-hierarchy, so the question is simple: Can I restrict the WYSIWYG editor to ordered lists only?
Dear stefan,
There isn't such a built-in feature within Types WYSIWYG editor field, if you need only a flat(non-hierarchy) order lists, you can try with the multiple instances single line field, then use Views shortcode [wpv--for-each] to display it as what you want, see our document:
https://toolset.com/documentation/views-shortcodes/#wpv-for-each
wpv-for-each
Iterate through multiple items in a post meta field and output the enclosed text for each item. Including Types repeating fields.
Thank you for the help! I think I simply try to hide the options of a WYSIWYG via css, and see if this works. 🙂