Home / Widgets / Filter to change Custom Post Type settings | Quick Event Manager
Duplicate Snippet

Embed Snippet on Your Site

Filter to change Custom Post Type settings | Quick Event Manager

The plugin uses Custom Post Types for Events. The default setting for the post type is ‘event’ as well as the slug. This filter allows you to change the post type settings and will further help you change the slug.

(Note this code snippet applies for "Quick Event Manager Plugin" available here: https://fullworksplugins.com/products/quick-event-manager/ )

Code Preview
php
<?php
add_filter(
	'qem_event_register',
/**
 * @param $args https://developer.wordpress.org/reference/functions/register_post_type/#parameters
 *
 * @return array
 */
	function ( $args ) {
		$args['rewrite'] = array( 'slug' => 'my_custom_event_slug' );
		return $args;
	},
	10,
	1
);

Comments

Add a Comment