This is a perfect use case for WordPress’ REST API.
It probably makes sense, to create a custom endpoint, where you can in detail define what results you need. Something along the lines of
<?php
add_action( 'rest_api_init', function () {
register_rest_route( 'kostas_calendar/v1', '/feed/', array(
'methods' => 'GET',
'callback' => 'kostas_calendar_endpoint_feed',
) );
} );
function kostas_calendar_endpoint_feed( WP_REST_Request $request ) {
// your code
}
Related Posts:
- Where to put my code: plugin or functions.php?
- Replace Content of Sidebar on Custom Post Type
- Widget area for individual posts (custom post type)?
- Custom post type not being pulled in widget
- Should I use custom post types or a custom database tables for plugin development?
- Where, When, & How to Properly Flush Rewrite Rules Within the Scope of a Plugin?
- How do I change the author of a custom post type?
- Custom Post Type Plugin: Where Do I Put The Template?
- Custom Post Type Data in Sidebar widgets?
- Best way to flush_rewrite_rules for custom post type, in a mu-plugins plugin?
- How to Add Custom Taxonomy To Woocommerce Plugin
- Using add_theme_support inside a plugin
- Creating a Custom Post Type as a Plugin? Why?
- Quick edit screen customization
- Mini-Site Strategy
- The Great Plugin Nomenclature Contest of 2011
- Prevent trash/delete action on specific post types
- How to add custom content template part for a custom post type on main query using a plugin
- How to completely disable a taxonomy archive on the frontend?
- How do you create an archive for a custom post type from a plugin?
- Including Custom Post Types in “Recent Posts” Widget
- How to add a button to custom post type’s posts-page
- Loading custom page template via plugin
- Why The Init Hook For Custom Post Types
- How to set a fall back template for a custom post type in a plugin?
- How to add multiple images to custom post type?
- Creating a custom public user page
- Limit widget to a specific registered sidebar
- wordpress plugin error handling
- How to get term link that crosses different custom post types?
- register_taxonomy with multiple object type and update_count_callback
- Redirect after deleting post and keep track of pagination
- How often do you need to register_post_type?
- get_edit_post_link() not working as expected when passed id in plugin
- Where to put archive-{post-type}.php
- Render a different post/template from within the template_include action?
- Is flush_rewrite_rules necessary when creating a custom post type? Why?
- How to use a dedicated template for the Custom Post Type from a plugin?
- How do I Make a custom post type get a custom post template in a plugin
- Include custom post types in categories widget
- Determine which template-{slug}.php is being loaded
- Including a custom post type in the Archives widget
- How to append text to title of Custom Post Type post (without affecting all titles on page)?
- Remove Slug from Custom Post Type results in 404
- WordPress metabox file upload in custom post [duplicate]
- working Custom Post Type and Widget code no longer works when moved from functions.php to plugin
- WordPress custom post action hook
- Unable to filter on field on edit.php page
- Multiple Permalinks for custom post type post
- On clicking on the category name the page is redirecting on 404 pge
- Insert slider (Custom Post Type) into pages
- How do I create a custom post type for a training CMS in WordPress?
- WP Query group/order by category name
- Save or update data when custom post published
- How to embed form data within the ‘Add new post’
- Remove POST_TYPE from custom post type permalink
- Uploaded image not appearing in custom post type
- Custom Taxonomy and tax_query Issue?
- Use a textarea for a custom post type
- Using posts and postmeta table to store custom Address Book Plugin data
- How to register custom post types in a plugin?
- Actions that Run on Admin Edit Page Load After Posts Are Queried
- Row actions not showing? Why?
- Make custom post type display as a page
- template_redirect not working, apparently for no reason
- How to: add option to add more checkboxes on custom post type
- Custom role capabilities to administrator not taking effect (no plugin)
- How do I add a custom button to my “edit” list? ( edit.php?post_type= ) beside “Add New”
- How to add multiple featured image in meta box in post editor?
- How to add notification in the sidebar of the administration panel when a Custom post type is created? [duplicate]
- Hierarchical or Non-hierarchical Custom Post Type in Real World Example
- how to set default value for checkbox in wordpress
- How to append element after thumbnail
- How do I include drag-and-drop in a plugin?
- How could I create a ‘private comments’ section on a custom post type?
- Custom Post Type get_post_type_archive_link( $post_type ) returns false
- How do I set the link in the Custom Post Type admin menu?
- How to List Thumbnails based on Custom Categories
- Add custom post types stats to a custom dashboard widget
- Adding Meta Boxes while Registering a Post Type in a Class
- How to have the right design for a custom post type without accessing themes
- Dynamic Custom Post Type Plugin
- How to create another version of the Category widget?
- How to rename image at uploading on specific plugin or post-type in WordPress
- ‘Pages’ widget alternative for custom post types?
- Including Custom Post Type posts in a page template contextually (or should I widget?)
- handling csv data with a custom post type
- How do I alter the position of a Custom Post Type menu item within my plugin admin menu?
- Customize permalink when creating a post
- Custom Taxonomy Not Showing in Menu
- Custom Post Type | Fatal Error on register_post_type()
- Set object terms not working on plugin activation
- Using custom page templates with plugin [duplicate]
- need advice on how to do a lists using custom post types – taxonomy vs postmeta
- Get all of user’s custom post types in WP Admin for plugin
- Issue with pre_get_posts on custom post type archive pages
- Custom Post Type Navigation on Custom Field
- Plugin translation not working apart from name and description
- Get rewrite slug of custom post type in template
- Custom Post Type rewrite