WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Delimiter for multiple titles in the small calendar - linebreak (9 posts)

  1. Opa114
    Member
    Posted 1 year ago #

    Hey,

    i want a delimiter for a new line/linebrak when i have multiple events one one day. \n oder
    did not work - is there any other working solution for it?

    Thanks for help.

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 1 year ago #

    have you tried other html line break? e.g. <br/>

    and also, what do you mean multiple titles in the small calendar? do you mean events title instead?

  3. Opa114
    Member
    Posted 1 year ago #

    yes i've tried:
    - did not work.

    yeah i mean the event titles. on the main page i have the calendar widget an when i move with the mouse over a day with one ore multiple events it shows a hover with the event title. and when the day have multiple events i want a seperator which creates a new line, so that every event title has a new line. and in the option page there is a optioen for a seperator but it only works with something like that: - / . > and so on, but i want a line break after the event title, so that it shows me a list.

  4. agelonwl
    Member
    Posted 1 year ago #

    try to use &_#_10_; in settings > formats/layouts > calendar format > Small calendar title separator (remove the underscore)

  5. Opa114
    Member
    Posted 1 year ago #

    yeahh, that worked! thank you very much! :)

  6. Opa114
    Member
    Posted 1 year ago #

    Hey ;)

    yesterday it worked, but today not :( an the reason is that it was deleted in the database. I lookedinto the wp_options table where the title seperator will be stored and the field is empty now. How do i prevent it from deleting it itself??

  7. agelonwl
    Member
    Posted 1 year ago #

    Hi,

    I also notices that, please try this

    Using template file calendar-small.php
    http://wp-events-plugin.com/documentation/using-template-files/

    if ( !empty($cell_data['events']) && count($cell_data['events']) > 0 ){
    					$new_title = "";
    					$em_event = $cell_data['events'];
    					foreach($em_event as $key => $val ){
    						$new_title .= $val->event_name."&_#_10_;";
    					}
    				}

    (remove the underscore at &_#_10_;)
    Paste the above snippet before this

    <td class="<?php echo $class; ?>">
    					<?php if( !empty($cell_data['events']) && count($cell_data['events']) > 0 ): ?>
    					<a href="<?php echo esc_url($cell_data['link']); ?>" title="<?php echo esc_attr($cell_data['link_title']); ?>"><?php echo date('j',$cell_data['date']); ?></a>
    					<?php else:?>
    					<?php echo date('j',$cell_data['date']); ?>
    					<?php endif; ?>
    				</td>

    then change this line

    <a href="<?php echo esc_url($cell_data['link']); ?>" title="<?php echo esc_attr($cell_data['link_title']); ?>"><?php echo date('j',$cell_data['date']); ?></a>

    with this

    <a href="<?php echo esc_url($cell_data['link']); ?>" title="<?php echo $new_title; ?>"><?php echo date('j',$cell_data['date']); ?></a>

    Note: this will ignore the title separator option in the em settings page

  8. Opa114
    Member
    Posted 1 year ago #

    thanks again!!! that worked now ;)

    Thank you very much!!

  9. pundurbrother
    Member
    Posted 1 year ago #

    There's one problem with your suggestion/above coding, it doesn't like quotation marks in titles. What I mean is if you have some text in title which is in quotation marks, on calendar date mouse over, it shows only text before quotation marks and doesn't even show next event if there is in that same day.

    Please check and let know if there's something can be fixed.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic