What is wrong with my code?

Community Forums Forums General Discussion What is wrong with my code?

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  AC 5 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #112017

    lazab
    Participant
    Post count: 3

    I keep getting this error message:


    Notice: Trying to get property of non-object in /server/file/location/themes/genesis/lib/functions/general.php on line 206<br/>
    Notice: Trying to get property of non-object in /server/file/location/themes/genesis/lib/functions/general.php on line 206<br/>
    Notice: Trying to get property of non-object in /server/file/location/themes/genesis/lib/functions/general.php on line 206<br/>
    Notice: Trying to get property of non-object in /server/file/location/themes/genesis/lib/functions/general.php on line 206<br/>
    Notice: Trying to get property of non-object in /server/file/location/themes/genesis/lib/functions/general.php on line 206<br/>

    Here is the code that I used to make the post type

    
    //Create Support Post Type
    
    add_action('init', 'my_custom_register_my_cpt_support');
    function my_custom_register_my_cpt_support() {
    register_post_type('support', array(
    'label' => 'Supports',
    'description' => 'This is an my_custom support functionality',
    'public' => true,
    'show_ui' => true,
    'show_in_menu' => true,
    'capability_type' => 'post',
    'map_meta_cap' => true,
    'hierarchical' => false,
    'rewrite' => array('slug' => 'support', 'with_front' => 1),
    'query_var' => true,
    'has_archive' => true,
    'menu_position' => '50',
    'menu_icon' => 'dashicons-hammer',
    'supports' => array('title','editor','excerpt','comments','thumbnail','author','page-attributes','post-formats','genesis-cpt-archives-settings'),
    'labels' => array (
      'name' => 'Supports',
      'singular_name' => 'Support',
      'menu_name' => 'My Support',
      'add_new' => 'Add New',
      'add_new_item' => 'Add New Support',
      'edit' => 'Edit',
      'edit_item' => 'Edit Support',
      'new_item' => 'New Support',
      'view' => 'View Support',
      'view_item' => 'View Support',
      'search_items' => 'Search Support',
      'not_found' => 'No Support Found',
      'not_found_in_trash' => 'No Support found in Trash',
      'parent' => 'Parent Support',
    )
    ) ); }
    
    //Create Categories Taxonomy for Support
    
    add_action('init', 'my_custom_register_my_taxes_support_category');
    function my_custom_register_my_taxes_support_category() {
    register_taxonomy( 'support_category',array (
      0 => 'support',
    ),
    array( 'hierarchical' => true,
    	'label' => 'Categories',
    	'show_ui' => true,
    	'query_var' => true,
    	'show_admin_column' => true,
    	'labels' => array (
      'search_items' => 'Category',
      'popular_items' => 'Popular Categories',
      'all_items' => 'All Categories',
      'parent_item' => 'Parent Category',
      'parent_item_colon' => 'Parent Categoty',
      'edit_item' => 'Edit Category',
      'update_item' => 'Update Category',
      'add_new_item' => 'Add New Category',
      'new_item_name' => 'New Category Name',
      'separate_items_with_commas' => 'Separate categories with commas.',
      'add_or_remove_items' => 'Add or remove categories.',
      'choose_from_most_used' => 'Choose from the most used categories',
    )
    ) ); 
    }
    
    //Create Tags Taxonomy for Support
    
    add_action('init', 'my_custom_register_my_taxes_support_tag');
    function accuteach_register_my_taxes_support_tag() {
    register_taxonomy( 'support_tag',array (
      0 => 'support',
    ),
    array( 'hierarchical' => false,
    	'label' => 'Tags',
    	'show_ui' => true,
    	'query_var' => true,
    	'show_admin_column' => true,
    	'labels' => array (
      'search_items' => 'tag',
      'popular_items' => 'Popular Tags',
      'all_items' => 'All Tags',
      'parent_item' => 'Parent tag',
      'parent_item_colon' => 'Parent Category',
      'edit_item' => 'Edit tag',
      'update_item' => 'Update tag',
      'add_new_item' => 'Add New tag',
      'new_item_name' => 'New tag Name',
      'separate_items_with_commas' => 'Separate Tags with commas.',
      'add_or_remove_items' => 'Add or remove Tags.',
      'choose_from_most_used' => 'Choose from the most used Tags',
    )
    ) ); 
    }
    
    

    Here is link to a screenshot: http://awesomescreenshot.com/0d632aoc9

    <script src=”http://pastebin.com/embed_js.php?i=Xep3LqyK”></script>

    http://local
    #112185

    AC
    Blocked
    Post count: 7712

    Instead of having these at the end:

    )
    ) ); }

    Try this instead:

    )
    ) ; }
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.