custom post type plugin error

Question

I followed the following to set up a plugin for custom post types:
https://kinsta.com/blog/wordpress-custom-post-types/#register

But i am getting the error:
Parse error: syntax error, unexpected ”, $args ); ‘ (T_CONSTANT_ENCAPSED_STRING), expecting ‘)’ in D:xampphtdocssimplerPRwp-contentpluginsgoldnuggs-custom-post-typegoldnuggs-cpt.php on line 48

Can anyone see my mistake?

 <?php
/*
Plugin Name: Register Custom Post Types

*/

function goldnuggs_register_post_type() {
    $labels = array(
 'name' => __( ‘Case-studies’, ‘goldnuggs’ ),
 'singular_name' => __( 'Case Study', ‘goldnuggs’ ),
 'add_new' => __( 'New Case Study', ‘goldnuggs’ ),
 'add_new_item' => __( 'Add New Case Study', ‘goldnuggs’ ),
 'edit_item' => __( 'Edit Case Study', ‘goldnuggs’ ),
 'new_item' => __( 'New Case Study', ‘goldnuggs’ ),
 'view_item' => __( 'View Case Studies', ‘goldnuggs’ ),
 'search_items' => __( 'Search Case Studies', ‘goldnuggs’ ),
 'not_found' =>  __( 'No Case Studies Found', ‘goldnuggs’ ),
 'not_found_in_trash' => __( 'No Case Studies found in Trash', ‘goldnuggs’ ),
);

$args = array(
 'labels' => $labels,
 'has_archive' => true,
 'public' => true,
 'hierarchical' => false,
 'supports' => array(
  'title',
  'editor',
  'excerpt',
  'custom-fields',
  'thumbnail',
  'page-attributes'
 ),
 'taxonomies' => 'category',
 'rewrite'   => array( 'slug' => 'case-study' ),
 ‘show_in_rest’ => true
);

register_post_type( ‘goldnugg_case', $args );

}
add_action( 'init', 'goldnuggs_register_post_type' );

Any help would be appreciated!

0
anna nguyen 2 months 2021-05-07T17:14:10-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse