Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Custom post type

$
0
0

Replies: 0

Hi, is it possible to add new custom post type instead of default wordpress post.
To achieve this I changed wp-content/plugins/accesspress-anonymous-post/inc/cores/save-post.php line 113, and added an option instead of ‘post’:
$post_arguments = array( ‘post_type’ => ‘post’,
‘post_title’ => $ap_form_post_title,
‘post_content’ => $ap_form_content,
‘post_status’ => $publish_status,
‘post_author’ => $author
);
to:
$post_arguments = array( ‘post_type’ => get_option(‘accesspress-post-type’),
‘post_title’ => $ap_form_post_title,
‘post_content’ => $ap_form_content,
‘post_status’ => $publish_status,
‘post_author’ => $author
);

but it would be great if you add this to the plugin, then I can update it without worry

  • This topic was modified 37 minutes ago by arashonline.
  • This topic was modified 37 minutes ago by arashonline.

Viewing all articles
Browse latest Browse all 59525

Trending Articles