Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

saNNNy on "Export post types with custom status for static HTML"

$
0
0

Hello,

I created two custom post statuses, one is public, one private. In WordPress, all works fine. The statuses are added to a custom post type.

But I want to export my website to static HTML (with WinHTTrack). Only 'published' posts are exported. The posts with a custom status are missing.

If I add the statuses to 'post' all posts are exported with my custom statuses. But not the posts of the custom post type.

I register my custom statuses in following code:

function custom_post_status()
{
	register_post_status('redaktion', array(
		'label' => _x('Redigiert', 'snippet'),
		'private' => true,
		'exclude_from_search'=> false,
		'show_in_admin_all_list' => true,
		'show_in_admin_status_list' => true,
		'label_count' => _n_noop( 'Redaktion <span class="count">(%s)</span>', 'Redigiert <span class="count">(%s)</span>')
	));

	register_post_status('testpublish', array(
		'label'	=> _x('Testveröffentlicht', 'snippet'),
		'public' => true,
		'exclude_from_search' => false,
		'show_in_admin_all_list' => true,
		'show_in_admin_status_list' => true,
		'post_type_support' => true,
		'label_count' => _n_noop( 'Testveröffentlicht <span class="count">(%s)</span>', 'Testveröffentlichte <span class="count">(%s)</span>')
	));
}
add_action('init', 'custom_post_status', 1);

The custom post type is registered in the next code snippet.

public static function register()
{
	$post_type_args = array
	(
		'public'  => TRUE,
		'show_ui' => TRUE,
		'exclude_from_search' => TRUE,
		'show_in_nav_menus' => FALSE,
		'rewrite' => array('slug' => 'snippet', 'with_front' => FALSE),
		'supports' => array('title', 'editor', 'author', 'revisions'),
	);
	register_post_type('snippet', $post_type_args);

Hopefully, someone can help me.
Thanks already.


Viewing all articles
Browse latest Browse all 8245

Trending Articles