From the WordPress admin panel, I go to Appearance -> Menus -> On the left side of the screen my custom posts called Services appears and I have an option to check Services archive and add it as a link to primary menu.
I am using Frontity on the front-end, so all of my wp content is being exposed via the API.
After saving the menu, when visiting wp-json, this is what the link looks like:
{
“id”: 83,
“order”: 3,
“parent”: 0,
“title”: “Services”,
“url”: “https://dev.some-url.test/services/”,
“attr”: “”,
“target”: “”,
“classes”: “”,
“xfn”: “”,
“description”: “”,
“object_id”: 12,
“object”: “services”,
“object_slug”: null,
“type”: “post_type_archive”,
“type_label”: “Архива врсте чланака”
}
As you can see, the slug is null, therefore on the front-end side of the project, I cannot use the link as I should.
The slug should be /services as this is the path to the services (custom post type) archive. Not sure why am I getting the null as a value to the link.
Hope this helps.
-
This reply was modified 3 years, 10 months ago by unique1233.
-
This reply was modified 3 years, 10 months ago by unique1233.