• WordPress 6.0
    Events Manager 5.12.1
    Twenty Twenty-two theme

    The ‘CONTENTS’ text in designated Events Manager pages isn’t pulling in the formatted EM layout while using the Twenty Twenty-two theme even with all all other plugins deactivated and gutenberg editor disabled.
    Everything worked fine when switching to Twenty Seventeen theme.

    Under ‘Pages >> Event List/Archives >> Events page:
    – The ‘Events page’ is set to this page: https://wp.times-up.org/calendar
    – ‘Override with Formats?’ is set to ‘yes’

    Using a EM shortcode works, but then we’re missing all the potential custom formatting. This page uses a shortcode: https://wp.times-up.org/calendar/categories

    The page I need help with: [log in to see the link]

Viewing 10 replies - 16 through 25 (of 25 total)
  • @palijn I’m not sure, something must still be conflicting.

    @chenryahts I bug-fu’ed some of the plugin source code.
    At this stage, and with all other plugins disabled, it appears that function em_content($page_content) is never called. So it’s little surprise that the

    CONTENTS

    string is never replaced.

    The add_action('wp_head', 'em_add_content_filter_after_head', 1000);
    and the `function em_add_content_filter_after_head(){
    add_filter(‘the_content’, ’em_content’); }`
    are indeed called (multiple times).

    So, at this stage, I’m a little out of my depth to understand why the filter is never called. Any guidance ?
    Thanks a lot for everyone’s help here !

    • This reply was modified 2 years, 3 months ago by Palijn.

    @palijn You might want to create a separate support question, that’s definitely a different issue ??

    @chenryahts well, I thought that this is exactly the current issue, as per the opening post :

    ‘CONTENTS’ hook not working

    .

    Do you think it would receive better following if I open a new one ? (I’d hate to open an issue only to find it marked duplicate of this one !)

    @palijn Yeah, it manifested the same way, but it sounds like you have a different problem (maybe in addition, if you’re using a block theme/child). Have you tried all their troubleshooting steps? https://wp-events-plugin.com/documentation/troubleshooting/

    I’d try that and then start a new thread with as much info as you have

    @chenryahts yes, I’ve tested all of that.
    I will open a new thread if you think it has better chances.

    But basically, it boils down to the title of this one : the ‘CONTENTS’ string in the selected “Events” page is never replaced in the Twenty-Twenty-Two default WordPress theme with all plugins disabled. Which I debugged a bit more establishing that the source code-level issue is that the filter function em_content($page_content) is never called.
    And unfortunately I’m not versed enough in WordPress to go further in debugging.

    @palijn The Events Manager Plugin’s template loaded doesn’t load the block templates.

    Did you see this comment: https://www.ads-software.com/support/topic/events-manager-pages-contents-hook-not-working-with-twenty-twenty-two-theme/#post-15822650 ?

    In that, if you replace the last else statement with:

    else{
    $post_template = locate_block_template( TEMPLATEPATH . '/templates/', EM_POST_TYPE_EVENT, $post_templates);
    if( !empty($post_template) ) $template = $post_template;
    }

    It might work? Did you try that version for the parent theme yet?

    • This reply was modified 2 years, 3 months ago by chenryahts. Reason: formatting

    @chenryahts I did indeed implement your first code proposal, and it worked well to display single events.
    Now I’ve replaced the code (if I read well, you replaced STYLESHEETPATH by TEMPLATEPATH ?) but it did not make any difference on the ‘CONTENTS’ replacement.

    (There is no parent theme, I’m directly using 2022).

    @palijn If you don’t have a child theme, I don’t even know why it worked before ??????

    I don’t have any other ideas, there must still be a conflict somewhere else

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘Events Manager pages ‘CONTENTS’ hook not working with Twenty Twenty-two theme’ is closed to new replies.