• Resolved narelly

    (@narelly)


    Hi, I can’t display events from The Events Calendar, I get the No posts found message where the grid should appear. If I choose both Events and Posts on the Query posts tab, then both appear in the grid, but I only need the events.

Viewing 5 replies - 1 through 5 (of 5 total)
  • azizulraju

    (@azizulraju)

    Our Dev team is currently working on this issue. We’ll get back to you asap!

    Thread Starter narelly

    (@narelly)

    OK, thank you.

    azizulraju

    (@azizulraju)

    Hi @narelly,
    We found some compatibility issues with the Events calendar plugin. For a quick fix, you can create a fake or dummy post type and on our post grid, just select the fake post with the event post type. Kindly follow the steps below:

    # Create a fake post type
    From your WordPress dashboard, go to Appearance => Theme File Editor and select the Theme Functions option from the right sidebar. Then copy the code from below and paste it into the bottom of the theme function file. Then click on the Update file button.
    Screenshot: https://i.imgur.com/5iVBMGb.png

    Code:

    function fake_setup_post_type() {
        $args = array(
            'public'    => true,
            'label'     => __( 'Fake', 'textdomain' ),
            'menu_icon' => 'dashicons-media-archive',
        );
        register_post_type( 'fake', $args );
    }
    add_action( 'init', 'fake_setup_post_type' );

    # Select Post Types
    Now under Post Grid => Query Post, just select the Fake post type along with the event post type, and you’re good to go.
    Screenshot:
    https://i.imgur.com/tK4IoEx.png

    • This reply was modified 2 years ago by azizulraju.

    Hi,
    We didn’t hear you for a long time. I hope you resolved the issue.

    Thread Starter narelly

    (@narelly)

    Sorry, I somehow missed the email notification about your answer. Yes it works, thank you very much! Does it mean, that if I only select Events, it won’t work, I have to choose another post type as well?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Query events from The Events Calendar’ is closed to new replies.