• Resolved crewstyle

    (@crewstyle)


    Hi,

    By accessing to Team and FAQ, there is an error:

    Trying to get property ‘post_type’ of non-object

    /home/web/authentiqueparenthese/web/statics/plugins/hypermarket-plus/includes/classes/hypermarket-plus-team.php

    It seems the error is in these lines:

    /**
    * Append custom admin columns to “Team” post type table
    *
    * @since 1.8.5
    */
    public function append_cols($columns)

    {
    global $post;
    // Bail out if we are in non team post type.
    if (‘team’ !== $post->post_type):
    return;
    endif;
    $columns = array(
    ‘cb’ => ‘<input type=”checkbox”>’,
    ‘post_thumb’ => __(‘Avatar’, ‘hypermarket-plus’) ,
    ‘title’ => __(‘Title’, ‘hypermarket-plus’) ,
    ‘role’ => __(‘Role’, ‘hypermarket-plus’) ,
    ‘author’ => __(‘Author’, ‘hypermarket-plus’) ,
    ‘date’ => __(‘Date’, ‘hypermarket-plus’)
    );
    return $columns;
    }

    Could you please fix it?
    Thanks,

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Trying to get property ‘post_type’ of non-object’ is closed to new replies.