ppmakki
Forum Replies Created
-
Yes yes, but I already found a solution.
I made a query directly to the database and that’s how a divide the emails by category on the sub-site.
The query I made is:
global $wpdb; $results = $wpdb->get_results( 'SELECT * FROM udh_terms WHERE term_id = (SELECT meta_value FROM udh_em_meta WHERE object_id ='. $em_booking->event_id .')', OBJECT );
I hope this will help someone.
Best
Now I am trying to create a custom conditional placeholder that will catch me the category also in the sub-site.
Here is my code:
add_action('em_event_output_condition', 'my_em_Category_event_output_condition', 1, 4); function my_em_Category_event_output_condition($replacement, $condition, $match, $EM_Event){ // echo '<pre>'; // print_r($EM_Event); // echo '</pre>'; if( is_object($EM_Event) && preg_match('/^is_category$/',$condition, $matches) && is_array( $EM_Event->categories->categories ) ){ if( in_array($matches[1],$EM_Event->categories->categories) ){ $replacement = preg_replace("/\{\/?$condition\}/", '', $match); }else{ $replacement = ''; } } return $replacement; }
What am I doing wrong?
Hi,
I am using the standard one.
I tried both with the name and the ID of the category and I get the same result.. on my main site it’s working with both and on the sub-site it’s not.
I am sorry for a late reply.
I already managed to do this with ajax calls.
I didn’t try it with multiple booking mode and when I will have time I will surely try it.
Thanks for the response anyway.The only thing was that I used wrong name for the taxonomy.
The right name is event-categories and everything else is the simple wp_query code to query by taxonomy terms.Forum: Plugins
In reply to: [Personal Fundraiser] Add my cause to some templateOr in other words.. can I add my cause form on any page no matter if it is a new or old page?
Forum: Plugins
In reply to: [Query Wrangler] show featured image with shortcodeThanks Jonathan this works great.
I had the “Exclude this field from display” option checked.. silly me ??
Great plugin btw, I love it!
Thanks againForum: Fixing WordPress
In reply to: Link to a single post of custom post typeAll I had to do was to make single.php page with following code:
<?php the_post(); ?> <?php the_meta(); ?>