Spacings, sections not in the List View

Home Forums Calendar Products Events Calendar PRO Spacings, sections not in the List View

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #988269
    Michael
    Participant

    Hi,

    I am sorry, but I have another one.

    Pse look at this URL: http://goo.gl/cw8B3k
    with the events.
    Everything is written thru, with no sections or paragraphs. While on the single Day there are “break, sections” etc.?
    Is it possible to:
    1. format the text (bring a sentence start into the next line, etc.?)
    2. show just the first couple of lines of the text in the list view and the complete text in the normal day view? E. G.
    http://goo.gl/cw8B3k
    So the “Programm” would not be shown in the List View: http://goo.gl/cw8B3k

    regards
    M

    #988342
    Barry
    Member

    Hi Michael,

    By default, list view will uses the excerpt rather than the full description. If this is not explicitly set (just as with regular posts and pages, you can hand craft an excerpt if you would like to do so via the editor) then WordPress will load the description instead.

    However, WordPress will also strip out formatting and shorten the text in such a case. If you wish to avoid this you can take one of two approaches:

    • The first, as above, is simply to craft your own excerpt text
    • The second is to modify the list/single-event.php template which you can do safely via a template override – and then just replace the_excerpt() with the_content()

    Would either of those options work for you?

    #988388
    Michael
    Participant

    Hi,

    when I understand correct, there should be just an excerpt of the event description to be seen in the list view?
    But – in this case the complete description is beeing seen in the list view? It is NOT shorten at all.
    If – where could I find this setting?

    regards
    M

    #988603
    Barry
    Member

    Hi!

    But – in this case the complete description is beeing seen in the list view? It is NOT shorten at all.

    Well, I don’t think that’s quite true.

    If you look here, the description is relatively long and includes pieces of information under the heading “Programm” – whereas the same event in list view does not include this.

    By default WordPress trims descriptions down to the first 55 words when it forms excerpts automatically — if as in some of your events the descriptions does not exceed that then they are not actually truncated (though formatting information is still removed).

    If – where could I find this setting?

    I’m afraid WordPress doesn’t provide a setting for this, but it is configurable through a short snippet (which you might add to your theme’s functions.php file):

    function custom_excerpt_length() { return 20; }
    add_filter( 'excerpt_length', 'custom_excerpt_length' );

    In the above example, excerpts will be truncated to 20 words if needed.

    Does that help/clarify things?

    #988756
    Michael
    Participant

    Hi Barry,

    thx a lot.
    And yes that clarifys everything to me.
    I will work on that.

    Pse close!

    regards
    M

    #988828
    Barry
    Member

    Thanks M — and good luck with the customizations 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Spacings, sections not in the List View’ is closed to new replies.