• Resolved Claymenia

    (@claymenia)


    Hi,
    you’re plugin seem great but very complicated to use it.

    I looking for display and hide an elementor block at a specific time : for exaample display text block the 2019-02-18 17:00:00 and hide it to 2019-02-18 18:00:00.

    Can you help me with syntax ?

    Thx a lot

Viewing 1 replies (of 1 total)
  • Plugin Author dudaster

    (@dudaster)

    I understand. This plugin was made with a programmer(me) in mind. If you didn’t find any alterantives here’s the code you could add inside the function.php of your theme (I recomend making a child theme, you can find plugins for this also):

    add_filter( "eleconditions_vars",function($custom_vars){
    	$currenttime=date("H:i:s");// the format is only for time... not for date and it looks like 17:00:00
    	if ("07:00:00" < $currenttime and $currenttime < "19:00:00"){ // the interval between 7am and 7pm of each day... if you want a specific date you add the entire format (2018-11-04 00:00:00) : date("Y-m-d H:i:s");
    		$custom_vars['intimeframe']=true;
    	}
    	return $custom_vars;
    });

    and if condition you can add:

    intimeframe === true

    Hope this would help you.

Viewing 1 replies (of 1 total)
  • The topic ‘Looking for display and hide’ is closed to new replies.