• 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’ )
    );

Viewing 1 replies (of 1 total)
  • Moderator t-p

    (@t-p)

    Your current theme “virtue_premium” is likely the error.

    To confirm, try switching to the unedited default Theme (Twenty Sixteen, etc.) for a moment using FTP , or your web-host’s cPanel or whatever file management application your host provides (no Dashboard access required). Navigate to /wp-content/themes/ and switch to the default theme by renaming your current theme’s folder by adding “-old” to the end of the folder name. Alternately, you can remove other themes except the default theme. That will force your site to use it.

Viewing 1 replies (of 1 total)

The topic ‘Parse Error and Syntax Error – PHP newbie’ is closed to new replies.