sorry for the confusion but what is that you are using which displays the word Array instead of the actual attribute and where is that you are trying to use #_ATT{Cost} ?
I think one issue is the imported events that I’m testing on. The events I imported on my testing server display ‘Array’ for 2 of the attributes,
but if I add a new event, that doesn’t happen. However, something is still off on the template.
In General>General Options>Event Attributes I have
#_ATT{Group}
#_ATT{Cost}
#_ATT{Register}
and I have ‘yes’ to enable attributes feature.
I’m using shortcodes on the archive page, but on the single page, I’m altering the single-event.php template.
The Group and Cost attributes display fine, but for Registrations, the client adds a link to Register, if registration is needed. In the template,
I am using the conditional
<?php echo $EM_Event->output('{has_att_register}<a href="#_ATT{Register}" target="_blank">Register for this event</a>{/has_att_register}'); ?>
which isn’t working (although on the live site, this is the same code and it works).
If I use
<p><b><?php echo $EM_Event->output('#_ATT{Register}');?></b></p>
it works, but many events don’t need a Registration link, so I want to use the conditional.
Why would that code work on one site and not another? I must be missing something?
Thanks for the help!
It sounds like maybe you haven’t copied the custom code across needed to create something like has_att_register.
I was using this, which seems to work on the live site:
<?php global $post;$EM_Event = em_get_event($post->ID, 'post_id');?>
By default, there is no has_att_register conditional placeholder. It must have been created with custom code.
Has that code also been copied across from the live site to the test site?
Thank you!!
That was it. I completely forgot I had added those conditionals in the functions.