Skip Navigation

[Resolved] Post Type: Ordered List? (using WYSIWYG / repeated single line / multiple lines)

This support ticket is created 7 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by stefanS-7 7 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#395380
Bildschirmfoto 2016-05-05 um 16.34.17.png

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

  • #395397

    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?

    #395582

    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.

    #395937

    Thank you for the help! I think I simply try to hide the options of a WYSIWYG via css, and see if this works. 🙂

    This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.