I can't get taxonomies?

Hello everyone … I am starting my first code lines with Frontity. I am stack with a small problem, when I want to call a taxonomy it returns an error. I have done everything as indicated by the documentation here: https://docs.frontity.org/api-reference-1/wordpress-source

I love the framework, I would like to learn it and achieve develop my owns themes.

Can someone help me with this?

Hi @nicolook.pro
Thank you for your question!

In order to help you better, can you provide a code repository so I can have a look at your current code and provide a more accurate solution to your problem?
Also having the wordpress server URL you’re using to get the data would be useful to track the problem

If you don’t have a repository, can you at least share the piece/s of code you think are related with what you’re trying to do?

In the meantime I will ask the Dev Team to check if they can figure out what the problem could be

Will be back to you ASAP

Buenos días Juanma, espero no incomode si respondo en Español, lo hago porque veo que eres de España y hablamos la misma lengua.

Con respecto al problema que estoy teniendo, en realidad recién estoy comenzando a dar mis primeros pasos y ya me gustó mucho el framework, por lo cual los felicito por el estupendo trabajo.

Debido a que recién arranco, solo tengo el proyecto en mi localhost, pero te envio la url del Wordpress que estoy consumiendo la data y te mando el frontity.settings.js que estimo que es el archivo donde puede que exista un error.

Por otro lado comentarte que hoy abrí nuevamente el proyecto y cuando ejecuté el comando npx frontity dev me apareció el siguiente error:

Error: EPERM: operation not permitted, rmdir 'C:\Users\Nicolas\Google Drive\CLIENTES\CURSOS\frontity\fronty-1\build\static'

Quizás tu sepas decirme a que se debe.

Porque hice un proyecto nuevo y lo pude ejecutar perfectamente, sin embargo este primer proyecto, en el cual trabajé perfectamente en mi primer encuentro, ahora no quiere arrancar?

Saludos y una vez más felicitaciones, me suena que este framework va a dominar en algún momento la relación REACT -> Wordpress en lo que se refiere a desarrollo de sitios.

Bueno… desde ya muchas gracias por la paciencia y ayuda.

Este es el Wordpress de donde saco la info: https://seoprowebsite.com/demos/staff/

Este es el frontity.settings.js: http://nicolook.com/files/frontity.settings.js

Hi @nicolook.pro,

Can you please make the question in English? Frontity is used worldwide and our team is distributed across several countries so the official language in this forum is English because:

  • some non-speaking-spanish Frontity staff member may be the right person to help with your issue
  • maybe some other community member has had a similar issue and can help you with your problem or add more relevant information
  • once the problem is solved, another community member may benefit from the solution and will be able to follow all the discussion

We have some pending work to make these “rules” more clear for the community, so sorry if this point is not clear enough

Thanks in advance for helping us creating a worldwide community around Frontity

1 Like

Good morning Juanma.

Regarding the problem that I am having, actually I am just starting to take my first steps and I already really liked the framework, for which I congratulate you for the great work.

Because I just started, I only have the project in my localhost, but I send you the url of the Wordpress that I am consuming the data and I send you the frontity.settings.js which I consider to be the file where there may be an error.

On the other hand, I’ve opened the project again and when I ran the command npx frontity dev the following error appeared:

Error: EPERM: operation not permitted, rmdir ‘C:\Users\Nicolas\Google Drive\CLIENTES\CURSOS\frontity\fronty-1\build\static’

Maybe you can tell me why.

I made a new project and I was able to execute it perfectly, however the first project that I’ve created, It does not work any more.

Well … thank you very much for your patience and help.

This is the Wordpress where I get the info: https://seoprowebsite.com/demos/staff/

This is the frontity.settings.js: http://nicolook.com/files/frontity.settings.js

Hi @nicolook.pro :slight_smile:

Your frontity.settings.js file seems fine.

The error seems related to permissions in your hard-drive. The command npx frontity dev deletes the \build\static folder each time it runs to ensure that the build folder only contains fresh files.

If you give the npx command permissions to write to the build folder and the problem should disappear.

you were right … the permissions on the BUILD folder had been changed.

Now I have the other one … why I can’t consult the taxonomies?

This is the code in the frontity.settings.json, I think it’s ok…

Maybe it’s because of how i did the code?

I leave the code.

Thanks again.

add_action(‘init’, ‘sttaff_empleos’);

if( !function_exists(‘sttaff_empleos’) ):

function sttaff_empleos() {

$labels = array(

		'name'                  => __('Empleos','sttaff'),
        'singular_name'         => __('Empleo','sttaff'),
        'add_new'               => __('Agregar Empleo','sttaff'),
        'add_new_item'          => __('Agregar Nueva Empleo','sttaff'),
        'edit'                  => __('Editar','sttaff'),
        'edit_item'             => __('Editar Empleo','sttaff'),
        'new_item'              => __('Nueva Empleo','sttaff'),
        'view'                  => __('Ver','sttaff'),
        'view_item'             => __('Ver Empleo','sttaff'),
        'search_items'          => __('Buscar Empleo','sttaff'),
        'not_found'             => __('No se han encontrado empleos','sttaff'),
        'not_found_in_trash'    => __('No hay Empleo en la papelera','sttaff'),
        // 'parent'                => __('Documento Padre','sttaff'),

	);

$args = array(

		'labels'				=> $labels,
		'public' 				=> true,
        'publicly_queryable'    => true,
        'has_archive' 			=> true,
        'show_ui'				=> true,
        'show_in_menu'          => true,
        'show_in_rest'          => true,
		'capability_type'		=> 'post',
		'hierarchical'			=> false,
		'menu_position' 		=> 2,
        'rewrite' 				=> array( 'slug' => 'empleos' , 'with_front' => true),
        'supports'              => array('title', 'editor', 'thumbnail'),
        'can_export' 			=> true,
        'menu_icon'				=> "dashicons-universal-access",
        'query_var'             => true,
        'pages'                 => true,

	);

register_post_type('empleos', $args);

/* Rubros */
register_taxonomy('rubros',array('empleos'), array(

    'labels' => array(
        'name'              => __('Rubro','sttaff'),
        'add_new_item'      => __('Agregar Nuevo rubro','sttaff'),
        'new_item_name'     => __('Nuevo Rubro','sttaff')
    ),

    'hierarchical'  => true,
    'query_var'     => true,
    'show_in_rest'  => true,
    'rewrite'       => array( 'slug' => 'rubro' ),
    'show_admin_column' => true,

    )

); // end tax

}

Hi @nicolook.pro

Apologies for the delay in getting back to you on this. I don’t see any problem with your PHP code, the registering of both the empleos CPT and the rubros CT look fine, and I can access them both using Postman.

Have you managed to resolve this issue?