Hi,
You need to put the code in a template file. Which page do you want to display the code on?
Not sure what you meant. The above snippet of code is in Events -> Settings -> Formatting -> Events -> Single Event Page.
Again, it works well if there is only one conditional placeholder. It doesn’t seem to work if there are two.
The other code mentioned in the Events Manager documentation said it should be in wp-config.php. Are there multiple wp-config.php? The doc doesn’t mention which one (if there are multiple ones).
Thanks,
Ben
Hi Ben,
Sorry, I got confused – I thought you meant you’d put everything in wp-config.php.
There’s only one wp-config.php file, so that’s not the problem.
Where does the {has_att_event_register_link} placeholder come from? Is that the custom placeholder you’ve added yourself? If it is, does it work ok on its own?
you need to add something to your wp-config file to enable nesting, see the docs link in your OP and look at the bottom section of that page
Marcus,
Unless I am mistaken (and maybe I wasn’t being clear), the something you mentioned I have already added, as indicated in my first post.
To be more specific, I have already added the following line to wp-config (unless you are talking about something else):
define('EM_CONDITIONAL_RECURSIONS',2);
Ben
What’s the {has_att_event_register_link} placeholder? Is that a custom placeholder you’ve created? If it is, does it work ok when not nested?
Yes, the has_att_event_register_link is a custom placeholder I created, and yes, I have tested it by itself and it works. To summarize:
When only using {has_att_event_register_link} custom placeholder – works
When only using {is_future} placeholder – works
When using both {has_att_event_register_link} and {is_future} placeholders – DON’T work
When using both {has_location} and {is_future} placeholders – DON’T work – just to make sure it isn’t my custom placeholder
BTW, I add the following line at the bottom of the wp.config.php file. I am assuming that should be okay?
define('EM_CONDITIONAL_RECURSIONS',2);
yes, that should work – define('EM_CONDITIONAL_RECURSIONS',2); at the end of your wp-config.php
however, I tried this one and seems to be working fine; can you try to disable your custom functions to see if things will work now?
how about removing your customizations altogether? i.e. at a code level.
recursions work for me, just tested
I removed the customizations (code for the custom conditional placeholders) and still not working. I tested it with:
{has_location}
{is_future}
<p>
Register
</p>
{/is_future}
{/has_location}
Other thoughts?
maybe try putting it in one line, or different spacing?
I copy/pasted the above and it works for me.