FYI here is where the type was registered in code if it helps
<?php
// register the custom post type
add_action('setup_theme', 'wpestate_create_property_type',20);
if( !function_exists('wpestate_create_property_type') ):
function wpestate_create_property_type() {
$rewrites = wpestate_safe_rewite();
if(isset($rewrites[0])){
$slug=$rewrites[0];
}else{
$slug='properties';
}
register_post_type('estate_property', array(
'labels' => array(
'name' => esc_html__( 'Listings','wprentals-core'),
'singular_name' => esc_html__( 'Listing','wprentals-core'),
'add_new' => esc_html__( 'Add New Listing','wprentals-
core'),
'add_new_item' => esc_html__( 'Add Listing','wprentals-core
'),
'edit' => esc_html__( 'Edit','wprentals-core'),
'edit_item' => esc_html__( 'Edit Listings','wprentals-co
re'),
'new_item' => esc_html__( 'New Listing','wprentals-core
'),
'view' => esc_html__( 'View','wprentals-core'),
'view_item' => esc_html__( 'View Listings','wprentals-co
re'),
'search_items' => esc_html__( 'Search Listings','wprentals-
core'),
'not_found' => esc_html__( 'No Listings found','wprental
s-core'),
'not_found_in_trash' => esc_html__( 'No Listings found in Trash','wprentals-core'),
'parent' => esc_html__( 'Parent Listings','wprentals-core')
),
'public' => true,
'has_archive' => true,
'rewrite' => array('slug' => $slug),
'supports' => array('title', 'editor', 'thumbnail', 'comments','excerpt'),
'can_export' => true,
'register_meta_box_cb' => 'wpestate_add_property_metaboxes',
'menu_icon'=>WPESTATE_PLUGIN_DIR_URL.'/img/properties.png'
)
);
with
if( !function_exists('wpestate_safe_rewite') ):
function wpestate_safe_rewite(){
$rewrites = get_option('wp_estate_url_rewrites',true);
$return = array();
if(is_array($rewrites)){
foreach($rewrites as $key=>$value){
$return[$key] = str_replace('/', '', $value);
}
}
return $return;
}
endif;
-
This reply was modified 2 years, 11 months ago by garpinc.