you can use shortcode [events_list blog=X] where X is the blog id and then create new search attribute using this tutorial – http://wp-events-plugin.com/tutorials/creating-custom-event-search-attributes/
Thread Starter
evens
(@evens)
what should I use or is there a way to get the id of all sub sites? I need to perform a load of events from all sub sites based on the custom fields, is that possible?
Thanks for the time and help!
Hiya,
There is a function called wp_get_sites in WordPress that will return a list of sites for you, from which you can obtain the ID.
Thanks,
Phil
Thread Starter
evens
(@evens)
I’m still a bit confused I hope you could help me get it a bit clearer. I manage to make it load the post ok with a much simple shortcode (Thanks angelo, I understand a bit more of shortcodes and styling now).
I used:
[events_list pagination=0 limit=1]
#_EVENTIMAGE{334,321}
<div class="heading">#_EVENTNAME</div>
[/events_list]
and it loads the layout exactly how I wanted (and it search through subsites too) but the problem I still can’t figure out even after reading http://wp-events-plugin.com/tutorials/creating-custom-event-search-attributes/ is how to query the posts by custom fields, I would normally use something like this
$the_query = new WP_Query( array('meta_key' => 'event_latest_gold', 'meta_value' => 'yes') );
But I have not been able to figure it out with the search example, I’m not that much good with php unffortunatetly 🙁
I would appreciate greatly if you could help me clarify this
Thaks!
Phil, appreciate your comment too, I didn’t know that was possible, This is the first multisite I have had setup.
If I understand correctly what you’re trying to do, I think you’re missing ‘post_type’ => ‘event’ from your code.
http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters
Thread Starter
evens
(@evens)
Yeah I know, what I was trying to say is if there is any way to include
'meta_key' => 'event_latest_gold', 'meta_value' => 'yes'
in the shortcode to load the posts based on the custom field “event_latest_gold” what I want to do is display a post that has the event_latest_gold with value “yes”
Thread Starter
evens
(@evens)
After a week or so now all make sense, the problem I was having is that attributes are hidden by default and I didn’t see events manager changes how is the structure of some custom fields key. By a mistake I manage to see the full list of custom fields and figure out how to resolve my problem.
I think it would be good if by default it displays the attributes instead of depending on adding a tag to the settings area.
Great plugin! thanks all of your help