Viewing 6 replies - 31 through 36 (of 36 total)
  • Thread Starter afreyer

    (@afreyer)

    i dont know why, but it doesnt work. i cannot loop the description field.
    I want:

    IF Ticket Description exists –> Show the Content of it. Thats all..

    I’m not sure what the issue is that you have now I’m afraid.

    Myself, Angelo and Caimin have given you a number of pointers to how to create a solution for your aim here.

    We can’t really do this for you so you’ll need to take that material and use that to figure out the exact code you’ll need to write for your specific situation.

    If you’re not comfortable or experienced with coding you’ll need to hire a developer to help you. There are many WordPress job sites available where you can find one.

    Thanks

    Thread Starter afreyer

    (@afreyer)

    @angelo: thank you for this example. i wrote this: `add_filter(’em_event_output_placeholder’,’my_em_styles_placeholders’,1,3);
    function my_em_styles_placeholders($replace, $EM_Event, $result){
    global $wp_query, $wp_rewrite;
    $EM_Tickets = $EM_Event->get_tickets();
    foreach($EM_Tickets as $EM_Ticket){
    $replace .= $EM_Ticket->ticket_name.”<br/>”;
    $replace .= $EM_Ticket->ticket_description.”<br/>”;
    }
    return $replace;
    }`
    and put it in functions.php. it works BUT all outputs of EM are showing ticketdescription now. why?
    thank you.

    Thread Starter afreyer

    (@afreyer)

    the insert of code seems not work. i put it between backticks.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    try this snippet

    add_filter('em_event_output_placeholder','my_em_custom_placeholders',1,3);
    function my_em_custom_placeholders($replace, $EM_Event, $result){
    
    	switch( $result ){
    
    		case '#_EVENTTICKETS':
    			$replace = '';
    			$EM_Tickets = $EM_Event->get_tickets();
    			foreach($EM_Tickets as $EM_Ticket){
    				$replace .= $EM_Ticket->ticket_name."<br/>";
    				$replace .= $EM_Ticket->ticket_description."<br/>";
    			}
    			break;
    
    	}
    
    	return $replace;
    }
    Thread Starter afreyer

    (@afreyer)

    you got it! thank you! thank you! thank you!
    One more time: Great Support! Great Plugin!

Viewing 6 replies - 31 through 36 (of 36 total)
  • The topic ‘Show Ticket Description’ is closed to new replies.