Striknin
Forum Replies Created
-
Yes I’ve tried this but it didn’t fix my problem.
I’ve spent a lot of time trying to use ACF correctly without any success.
Now I use “Types” and it works better but I needed to customize your plugin’s classes (em-event.php and em-location.php)
save() and save_meta() functions seems to mix attributes, some are stored in EM_Event object and some in EM_Location object.
I needed to move attribute from first object to second (or vice versa) like this :
$this->get_location()->location_attributes['location_attribute_1'] = $this->event_attributes['location_attribute_1'];
in save_meta() just underglobal $wpdb;
With this, my attributes are well stored for location and not for event in post_meta table.Previously with ACF, it was the opposite : attributes was stored in EM_Location and not in EM_Event so in the database my attribute was stored in post_meta table with location post_id and not in em_events table in ‘event_attributes’ field.
I hope it will help you find the problem …
of course…
I’m sure this problem don’t come from ACF but from EM because with any other custom post type, it works.
And only in certain cases : when a new location is submitted at same time of event.
Could you give me an idea of where I can find post location functions in EM (those which are implicated in event post) ?I can’t disable auto-completer because of my client. He needs to create locations at the same time he creates events. (He don’t want a dropdown of existing locations and having to create a location before)
#_ATT placeholders won’t match with one of my fields, I need to display a list of checkboxes as a single field. This is the reason why I’ve installed ACF.
I searched a bit in the database and I noticed that my fields are partially registered.
In the field ‘event_attributes’, there is onlya:0:{}
…I’ve found nothing else to fix it at this time…
Hi.
What do you want exactly?
Could I give you an access to my dev site by mail to test?I also needed of this and I’ve found to solution, so I post it for those who want to know much :
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; switch( $result ){ case '#_CATEGORYSLUG': $replace = 'none'; $event_category_id = $EM_Event->get_categories()->get_ids(); $event_category_slug = $EM_Event->get_categories()->categories[$event_category_id[0]]->slug; $replace = $event_category_slug; break; } return $replace; }
I’ve already seen and test all in this post. My attribute isn’t a field like a taxonomy, I need a select list where the user can only choose one option.
If there is any possibility with the post you wrote, I could try but at this time it don’t help me …
Have any other idea ? Please ?
ThanksHello,
You have to simply do this :
Replace on line 252 :
$rpg=stripslashes($rpg);
by
$rpg=stripslashes_deep($rpg);
That’s all ??
Have fun with this plugin!