• Resolved artesk1ll

    (@artesk1ll)


    Hello, I have a design to show events.
    this is it – http://prntscr.com/q61jzk

    I try to output events but they don’t look like I need. it looks like this at the moment – http://prntscr.com/q61lay.
    looks similar but doesn’t work as needed.

    at first i tried to get out with the tap [events_list_grouped], but it didn’t look the way I needed it to, so I’m using the code now

    <?php echo do_shortcode('[events_list scope="future" limit="1"]
    	<div class="calendar_events">
    		<div class="calendar_events_date">
    				#_{d}
    		</div>
    		<div class="calendar_events_month">
    			<p>#_{F}</p>
    			<div class="calendar_events_day">
    					#_{l}
    			</div>
    			</div>
    	</div>
    	[/events_list]');
    	?>
    	<?php echo do_shortcode('[events_list_grouped scope="future" limit=2]
    	<div class="events_description">
    		<div class="events_description_item">
    			<p>
    	<?php if(#_24HSTARTTIME): ?>		
    			#_24HSTARTTIME
    			<?php endif; ?>
    			</p>
    			<span>
    			<?php if(#_EVENTNAME): ?>
    			#_EVENTNAME
    			<?php endif; ?>
    			</span>
    		</div>
    	</div>
    	[/events_list_grouped]');
    ?>
    

    but i can use this code only if i know how many events at this day, so i need universal solution which will show times and names of event in one day.
    someting like

    $events;
    limit = $events;
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    you can try something like $event_count = EM_Events::count(array('scope'=>'today'));

    https://wp-events-plugin.com/documentation/event-search-attributes/

    Thread Starter artesk1ll

    (@artesk1ll)

    Thanks, your answer is very helpful, it’s work for me.
    And I have another question.
    I read the documentation and I don’t understand how I can change the search result page and the events list page. I try to copy files named events-list.php and events-search.php and change it, but it doesn’t work. Please tell me what do I need to delete or add to change the event list view? Maby I do something wrong when I create a new folder in my theme folder?
    This is where I copy files – http://prntscr.com/q8sv30
    And there is the folder in my theme – http://prntscr.com/q8svnb

    And another problem, the search doesn’t work, I try to use <?php echo do_shortcode( '[event_search_form]' ) ?> and <?php get_search_form(); ?> and it’s do not show any results if I serch for event. Can you help me with it?

    Thread Starter artesk1ll

    (@artesk1ll)

    Thanks, your answer is very helpful, it’s work for me.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘set a limit equal to the number of events’ is closed to new replies.