• 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. Menus are exposed by WP API MENUS plugin.

    After saving the menu, when visiting wp-json (https://dev.some-url.test/wp-json/wp-api-menus/v2/menus/2), 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.

  • The topic ‘Custom Post Type Archive Link Menu Not Working’ is closed to new replies.