Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    sorry the page is access denied for me however by ‘long-term event’ did you mean recurring events?

    Thread Starter Mokl

    (@mokl)

    Sorry Angelo, I have service provide Geo Blocking on my site. Look at my site, it’s OK for you now.

    Yes, I mean recurring events.
    Thank you.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    I see now, did you mean hide recurring events on other events list page?

    Thread Starter Mokl

    (@mokl)

    I would like hide recuring events only on main page – list of all events, and show at recuring events only here – (it names “dlouhodobé akce” category) https://www.olomouczadarmo.cz/udalosti/kategorie/dlouhodobe_akce/

    Its possible?

    Thank you Angelo.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    here’s another snippet which may help you with this – https://pastebin.com/aipvNNmF

    As for where to paste this : https://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/

    Thread Starter Mokl

    (@mokl)

    OK. Short code is pasted and its looks very well. (code is inside functions.php at child theme)
    But I lost my navigation below, to the next list of future events, and this list is limited to eight events only. Can this have it somewhere on modified? And then will be perfect.
    Before home page depend on CONTENTS, now all depend on short code only.

    Thank you.
    M

    Plugin Support angelo_nwl

    (@angelo_nwl)

    I checked on your site and seems okay; can you give us more info?

    thanks

    Thread Starter Mokl

    (@mokl)

    Oops i see them. Short code rewrite my navigate menu under list of events and number of visible actual events. I need edit this code yet. I seems your code is depend on short code.

    Sorry, I don’t follow you. Can you explain more about the problem? Thanks.

    Thread Starter Mokl

    (@mokl)

    When I used a shord code, reccuring events has separated from home page list of events and were seen only on extra page for recuring events here , but I lost all navigation for next page and all code below – affiliate code and text. And i saw four events only. I have more than twenty actual events in the future. I had to disable it.
    When I disable short code, recuring events appear on home page ?? , and I see all navigation below and code looks right. This is situation of now, what you see.
    Before now, code is depend on short code, OK but I could never correctly adjust home page at settings.

    Many thanks for any help.

    It sounds like there was something with the way you were using the shortcode because it shouldn’t interfere with the rest of the page.

    Can you post the normal shortcode you’re using?

    Thread Starter Mokl

    (@mokl)

    Short code is inserted into functions.php at child theme. In the end.

    /*
    USAGE: [events_list hide_recurring=1]
    */
    
    add_filter('em_events_get_default_search','my_em_styles_get_default_search_hide_recurr',1,2);
    function my_em_styles_get_default_search_hide_recurr($searches, $array){
            if( !empty($array['hide_recurring']) ){
                    $searches['hide_recurring'] = $array['hide_recurring'];
            }
            return $searches;
    }
    
    add_filter('em_events_get','my_em_hide_recurr',1,2);
    function my_em_hide_recurr($events, $args){
            if( !empty($args['hide_recurring']) && is_numeric($args['hide_recurring']) ){
                    foreach($events as $event_key => $EM_Event){
                            if ( !empty($EM_Event->recurrence_id) ){
                                    unset($events[$event_key]);
                            }
                    }
            }
            return $events;
    }
    Plugin Support angelo_nwl

    (@angelo_nwl)

    as per caimin’s suggestion above it should not interfere with the rest of the page and unfortunately we can’t help you with the complete code as per the policy and the above snippet should give you a startup idea on how to make this work. sorry

    https://eventsmanagerpro.com/support-policy/

    Thread Starter Mokl

    (@mokl)

    Thank you angelo and caimin_nwl. I will try by myself sort it. When will be OK I leave a post here.
    Thanks for your help.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    okay, let us know if you have further questions.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Page for separate long-term events only’ is closed to new replies.