skip to Main Content

I’m trying to remove the services post type in the Start Genesis child theme. The Start theme comes bundled with a services post type. I have a page with the URL — http://domain.com/services — but when I try to the view the page on this url, I am greeted with a 404 not found yet I know this page exists and has content.

Now for SEO reasons this is the best URL for this page so changing it is not an option.

To my question, is there a way to remove the services post type in the Start theme?

Thanks

2

Answers


  1. Chosen as BEST ANSWER

    For anyone having the same issue, response from the theme author regarding the "services" post type

    There's a custom post type "Services" and /services/ url will load the archive page of services post type which conflicts with your page.

    If you don't use services post type, you can remove that in zp_cpt.php file ( the file is in /include/cpt/ folder ).

    In the file, remove or comment out this code

    $services_custom_default = array('supports' => array( 'title', 'editor','thumbnail', 'revisions' ),'menu_icon' => get_stylesheet_directory_uri().'/include/cpt/images/portfolio.png',);
    $services = new Super_Custom_Post_Type( 'services', 'Service', 'Services', $services_custom_default );
    $services->add_meta_box( array('id' => 'services_settings','context' => 'normal','fields' => array('icon_type' => array( 'type' => 'select', 'options' => array('font-awesome' => 'Font-Awesome','glyphicons' => 'Glyphicons', 'image' => 'Image' ), 'data-zp_desc' => __( 'Select icons to use. Font-Awesome, Glyphicons or an Image.','start') ),'icon_class' => array( 'type' => 'text','data-zp_desc' => __( 'Add icon classes. For font-awesome classes, please refer to this link <a href="http://fontawesome.io/icons/">page</a>. For Glyphicons, refer to this <a href="http://getbootstrap.com/components/">page</a> ','start') ),'icon_link' => array( 'type' => 'text', 'data-zp_desc' => __( 'Service item link','start') ),'icon_target' => array( 'type' => 'select', 'options' => array('_blank' => '_blank','_self' => '_self', '_parent' => '_parent' ), 'data-zp_desc' => __( 'Target','start') ),)
    ) );
    

  2. Try this..

    function custom_unregister_theme_post_types() {
         global $wp_post_types;
         if ( isset( $wp_post_types[ 'services' ] ) ) {
            unset( $wp_post_types[ 'services' ] );    
         }
    }
    
    add_action( 'init', 'custom_unregister_theme_post_types', 20 );
    

    Note : Please make a back up of your database before trying.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search