Support » Plugin: Theater for WordPress » Show more when using limit

  • Resolved ossiesayshi


    I have a lot of events on my events page (209) and the page takes a lot of time to load. Is there a way to get a “show more” link at the bottom when using limit= string?

    I’ve tried paginateby and groupby but that doesnt do the trick.

    Or does anyone have another tip?


    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeroen Schmit


    Hi Oscar,

    How did you try the paginateby and groupby arguments, because they should work. How are you showing the events on the events page? Did you use the setting in Theater → Settings or did you use the shortcode?

    Thread Starter ossiesayshi


    Hi Jeroen,

    I’m using this shortcode on my page:
    [wpt_events paginateby="category,month"]{{thumbnail|permalink}} {{categories}} {{title|permalink}} {{remark}} {{datetime|date(l j F Y - H:i \u\u\r)}}<b>Locatie: {{location}}</b>{{tickets}}[/wpt_events]

    Plugin Author Jeroen Schmit


    I see. There is no option to display a ‘read more’ link.

    Another approach could be to automatically jump to the page of the first month.

    You can achieve this by adding the following code snippet to the functions.php of your website:

    	function veurs_set_default_month() {
    		global $wp_query;
    		global $wp_theatre;
    		if (
    			is_page($wp_theatre->listing_page->page()->ID) &&
    			empty($wp_query->query_vars['wpt_month']) &&
    			empty($wp_query->query_vars['wpt_day']) &&
    		) {
    			$months_args = array(
    				'start' => 'now',	
    			$months = $wp_theatre->events->get_months($months_args);
    			if (!empty($months)) {
    				$months_keys = array_keys($months);
    				$wp_query->query_vars['wpt_month'] = $months_keys[0];			
    add_action( 'wp', 'veurs_set_default_month' );

    Please make a backup before adding this code.

    Thread Starter ossiesayshi


    Thanks! That does the trick!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Show more when using limit’ is closed to new replies.