Suporte » Plugins » meu single Post não Funciona

  • Resolvido Allan da Silva

    (@allanweb019)


    é uma pagina de sigle é nomeada “single-servicos.php”
    segue código

    if ( ! function_exists('post_type_servico') ) {
    
    // Register Custom Post Type
    function post_type_servico() {
    
        $labels = array(
            'name'                => 'Serviços',
            'singular_name'       => 'Serviço',
            'menu_name'           => 'Serviço',
            'name_admin_bar'      => 'Serviço',
            'parent_item_colon'   => 'Parent Item:',
            'all_items'           => 'Todos serviços',
            'add_new_item'        => 'Novo serviço',
            'add_new'             => 'Adicionar serviço',
            'new_item'            => 'Novo',
            'edit_item'           => 'Editar',
            'update_item'         => 'Atualizar',
            'view_item'           => 'Ver serviços',
            'search_items'        => 'Buscar serviço',
            'not_found'           => 'Sem serviço',
            'not_found_in_trash'  => 'Not found in Trash',
        );
        $rewrite = array(
            'slug'                => 'servicos',
            'with_front'          => false,
        );
    
        $args = array(
            'label'               => 'serviços',
            'description'         => 'Nossos serviços',
            'labels'              => $labels,
            'supports'            => array('title','editor','thumbnail','excerpt'),
            'hierarchical'        => false,
            'public'              => true,
            'show_ui'             => true,
            'show_in_menu'        => true,
            'menu_position'       => 5,
            'menu_icon'           => 'dashicons-hammer',
            'show_in_admin_bar'   => true,
            'show_in_nav_menus'   => true,
            'can_export'          => true,
            'exclude_from_search' => false,
            'publicly_queryable'  => true,
            'has_archive'         => 'servicos',
            'rewrite'             => $rewrite,
            'capability_type'     => 'post',
        );
        register_post_type( 'servicos', $args );
    
    }
    
    // Hook into the 'init' action
    add_action( 'init', 'post_type_servico' );
    
    }
Visualizando 1 resposta (de um total de 1)
  • Criador do tópico Allan da Silva

    (@allanweb019)

    Galera resolvi é só ir em link permanente mudar a forma salvar e voltar a forma de link anterior e salvar novamente

Visualizando 1 resposta (de um total de 1)
  • O tópico ‘meu single Post não Funciona’ está fechado para novas respostas.