I’ve been working on a wordpress site, and the last thing I was working on was adding a custom post type. Everything was working yesterday before I left it, and now when I go to my site, there is no admin login page. The rest of the site is still there in the same shape it was(albeit not good), but when i type in the url for the admin page(www.mcquistonator.com/cbc/wp-admin, it returns just a blank page.
Some other notes that may or may not be helpful.
I had added the custom post type and was successful in that it showed up in my Admin section under Posts, with All Posts and Add New as sub-menu items. As far as the admin side went, all seemed to work just fine, but when I clicked on view page, i would get a 404 page.
Here is the code i added to my functions.php to add the post type below. I had messed around with a couple times adding the last ‘rewrite’ => array(‘slug’ => ‘products’) parameter to try to solve the 404 problem as it seemed that whatever the problem was somehow had to do with a mismatch between actual location of the post and the url my admin was generating. Admittedly i was shooting in the dark trying to solve this problem, but now I am REALLY shooting in the dark as i have no admin panel and all i have is my FTP application.
<?php
add_action( ‘init’, ‘create_post_type’ );
function create_post_type() {
register_post_type( 'CBC_Examples',
array(
'labels' => array(
'name' => __( 'Examples' ),
'singular_name' => __( 'Example' )
),
‘supports’ => array(‘title’, ‘editor’, ‘custom-fields’),
'public' => true,
'has_archive' => true,
'rewrite' => array('slug' => 'products'),
)
);
}
?>