Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #882184

    Dear kriesi,

    I can’t find another p[lace to start a new thread on Choices. Sorry for that, I now post it here:
    I recently updated Event Manager from 5.7.3 to 5.8.1.1., using Choices 4.1 on WP 4.9. Unfortunately the current & future events did not show up. I ‘solved’ the issue with Marcus Sykes, the maker of Events Manager. It appeared it has something to do with Choices as Marcus wrote to me, which he solved by adding “add_filter(‘the_content’, ’em_content’);” to the top of of the functions.php file.

    The full text of his feedback was:
    Hi Christiaan,
    The problem is in your theme, but I can’t track down exactly why because after downloading the theme to my site, and even exporting your EM settings into my own site, it works fine.
    The reason it happens is because you have a template associated with it using your theme’s builder functionality. Removing that, the problem goes away.
    However, I can prove that the theme is at fault, because this is a snippet of code pretty much exactly taken from the developer docs – https://developer.wordpress.org/reference/hooks/the_content/
    add_filter( ‘the_content’, ‘filter_the_content_in_the_main_loop’ );
    function filter_the_content_in_the_main_loop( $content ) {
    // Check if we’re inside the main loop in a single post page.
    if ( is_page() && in_the_loop() && is_main_query() ) {
    return $content . “I’m filtering the content inside the main loop”;
    }
    return $content;
    }
    When templates are associated on a page like you’ve done with the Events Manager page, it won’t work. It works on another page without a template associated with it.
    I’m actually already in contact with Kriesi about this on another theme of theirs, but I’d suggest bumping them about this problem, so they know customers are also complaining.
    I have, however, fixed the problem for you by adding
    add_filter(‘the_content’, ’em_content’);
    to the top of the functions.php file, that sorts the problem out, but you may have compat issues with some WP SEO plugin features (and possibly others I’m not aware of). that’s more or less how it was in the earlier update.
    Best Regards,
    Marcus Sykes
    Events Manager Lead Developer

    I’m currently trying to understand all this, but would like to call the attention of you for the issue.
    Christiaan

    #882964

    Hey Bolandpc,

    Thank you for using the Choices theme.

    You can open a new ticket in the following link. https://kriesi.at/support/forum/choices/

    Did you use the template builder to create the content of the “Events” page? Please note that the builder is using the “template-dynamic.php” file which is not the same as the default templates like loop-page.php or loop-single.php, so the plugin’s hook is not going to work there.

    Best regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.