Notice: Undefined index: pts_post_type in…
-
I was getting the following error/s when creating new posts:
- ( ! ) Notice: Undefined index: pts_post_type in ./wp-content/plugins/post-type-switcher/post-type-switcher.php on line 269
- ( ! ) Notice: Undefined index: pts-nonce-select in ./wp-content/plugins/post-type-switcher/post-type-switcher.php on line 273
(I was also using a custom post type – not sure if this was a part of the issue).
The fix is pretty simple.
I had to add some new code at ~line 263:public function save_post( $post_id, $post ) { // begin fix // Check PTS field is applicable to this request. if( empty($_REQUEST['pts_post_type']) ) return; // end of fix // Post type information. $post_type = $_REQUEST['pts_post_type']; $post_type_object = get_post_type_object( $post_type );
Hope this helps someone else ??
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Notice: Undefined index: pts_post_type in…’ is closed to new replies.