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

    (I started this thread in the wrong place (https://kriesi.at/support/topic/ (Purchase code hidden if logged out) -with-choices/#post-882964), so now I copy what has been sais so far )

    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

    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

    My Events page uses Standard Template and for Layout “Right Sidebar” , but the page is not shown.
    The pages that shows the future events is also the homepage and is called “Binnenkort’ (Dutch for ‘Soon’). It uses also Standard Template and for Layout a Template that has just no-sidebar and a Post/Page Content.

    However, the key word CONTENT shows as “CONTENT” when I updated to Events Manager 4.8.1.1.
    First I used the tweak “add_filter(‘the_content’, ’em_content’);” to the top of the functions.php file. That worked OK.
    Then, trying to follow the further remarks of Markus, I
    – selectied [No Events Page] for the Event list/Archives in Event Manager Options.
    – replaced CONTENT with [events_list scope=”future” order=”ASC”]
    That made that I could delete the tweak in functions.php (which might be overwritten at a Choices update).

    Now I’m puzzled as to what you want to say with “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.” Do you mean the “add_filter(‘the_content’, ’em_content’);” hook? Or is that not a hook at all?

    Christiaan

    #884528

    Hey Bolandpc,

    Thank you for the update.

    My Events page uses Standard Template and for Layout “Right Sidebar” ,

    Did you create the “Right Sidebar” template in the Template Builder? Please provide an access to the site and create a test page so that we can check the issue.

    Now I’m puzzled as to what you want to say with “Please note that the builder is using the “template-dynamic.php” file

    The template is where the Template Builder renders the elements (slider, heading, post content, blog etc etc). You can think of the “template-dynamic.php” as the container.

    Best regards,
    Ismael

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

You must be logged in to reply to this topic.