Support » Plugin: Events Manager » "#_EVENTCATEGORIESIMAGES" as line of images

  • Resolved azchipka


    Ok so here is my issue the placeholder for “#_EVENTCATEGORIESIMAGES” creates a list of the images as it is supposed to. What I want instead of a list is all the images displayed in a single line. I am sure I am just missing something stupid here. The code for it being a list is shown below. If I simply remove all the list formatting from the code I still get a line break between the images. Suggestions??

    /* @var $EM_Event EM_Event */
    $count_cats = count($EM_Event->get_categories()->categories) > 0;
    if( $count_cats > 0 ){
    	$one_image = false;
    	<ul class="event-categories-images">
    		<?php foreach($EM_Event->get_categories() as $EM_Category): /* @var $EM_Category EM_Category */ ?>
    			<?php if( $EM_Category->get_image_url() != '' ): ?>
    			<li><?php echo $EM_Category->output("#_CATEGORYIMAGE"); $one_image = true; ?></li>
    			<?php endif; ?>
    		<?php endforeach; ?>
    		<?php if (!$one_image): ?>
    			<li><?php echo get_option ( 'dbem_no_categories_message' ); ?></li>
    		<?php endif; ?>
    	echo get_option ( 'dbem_no_categories_message' );

Viewing 2 replies - 1 through 2 (of 2 total)
  • azchipka


    Ok so I solved the issued by removing only the

    • and
    • coding but what I need to do now is cause a line break after a certain number of images. Suggestions?



    //try to add something like
    $count += 1;
    if ($count == 3)echo "<br/>";
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘"#_EVENTCATEGORIESIMAGES" as line of images’ is closed to new replies.