I have a custom post type like below (not customized yet).
function movie_reviews_init() {
$args = array(
'label' => 'Movie Reviews',
'public' => true,
'show_ui' => true,
'capability_type' => 'post',
'hierarchical' => false,
'rewrite' => array('slug' => 'movie-reviews'),
'query_var' => true,
'menu_icon' => 'dashicons-video-alt',
'show_in_menu' => 'myplugin',
'supports' => array(
'title',
'editor',
'page-attributes',)
);
register_post_type( 'movie-reviews', $args );
}
I have looked and looked but cant figure out how to get the title from the posts. I need the title in a variable to compare with the users input using levenshtein-distance and later display the most relevant post.
In My plug-in custom post type Register
Get
Post title
inphp
page