Parse Error and Syntax Error – PHP newbie
-
Hey all,
I’m getting the following error message on my site and need help please. Thank you!Parse error: syntax error, unexpected ”comments” (T_CONSTANT_ENCAPSED_STRING), expecting ‘)’ in /home2/thegrita/public_html/thegritandgraceproject/wp-content/themes/virtue_premium/lib/post-types.php on line 35
——————————–
Below is the section. Line 34 and 35 begins…
——————————–‘supports’ => array( ‘title’, ‘excerpt’, ‘editor’, ‘author’, ‘page-attributes’, ‘thumbnail’, ‘comments’ )
Here is the whole section.
<?php
// Custom post types
if ( !is_plugin_active(‘virtue-toolkit/virtue_toolkit.php’) ) {
function portfolio_post_init() {
$portfoliolabels = array(
‘name’ => __(‘Portfolio’, ‘virtue’),
‘singular_name’ => __(‘Portfolio Item’, ‘virtue’),
‘add_new’ => __(‘Add New’, ‘virtue’),
‘add_new_item’ => __(‘Add New Portfolio Item’, ‘virtue’),
‘edit_item’ => __(‘Edit Portfolio Item’, ‘virtue’),
‘new_item’ => __(‘New Portfolio Item’, ‘virtue’),
‘all_items’ => __(‘All Portfolio’, ‘virtue’),
‘view_item’ => __(‘View Portfolio Item’, ‘virtue’),
‘search_items’ => __(‘Search Portfolio’, ‘virtue’),
‘not_found’ => __(‘No Portfolio Item found’, ‘virtue’),
‘not_found_in_trash’ => __(‘No Portfolio Items found in Trash’, ‘virtue’),
‘parent_item_colon’ => ”,
‘menu_name’ => __(‘Portfolio’, ‘virtue’)
);$portargs = array(
‘labels’ => $portfoliolabels,
‘public’ => true,
‘publicly_queryable’ => true,
‘show_ui’ => true,
‘show_in_menu’ => true,
‘query_var’ => true,
‘rewrite’ => false,
//’rewrite’ => array( ‘slug’ => ‘portfolio’ ), /* you can specify its url slug */
‘has_archive’ => false,
‘capability_type’ => ‘post’,
‘hierarchical’ => false,
‘menu_position’ => 8,
‘menu_icon’ => ‘dashicons-format-gallery’,
‘supports’ => array( ‘title’, ‘excerpt’, ‘editor’, ‘author’, ‘page-attributes’, ‘thumbnail’, ‘comments’ )
);
The topic ‘Parse Error and Syntax Error – PHP newbie’ is closed to new replies.