• Resolved sabkor

    (@sabkor)


    I use Categories on my site to categorize news posts and highlight certain groups of news posts on certain pages of my site.

    When I started using the Gutenberg editor with the latest version of this plugin, I could no longer see the Categories selection box.

    Modifying the following bit of code fixed it up for me and I can now categorize my news items again.

    /includes/sp-news-post-type.php
    Line 45 (from): ‘taxonomies’ => array(‘post_tag’)
    Line 45 (to): ‘taxonomies’ => array(‘post_tag’, ‘category’)

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter sabkor

    (@sabkor)

    Sorry, just realized that’s not actually working. It’s showing me the general WordPress categories, not the custom News categories. I attempted to change the category string to news-category and the constant WPNW_CAT and neither worked. I will attempt to figure out what I’m doing wrong and report back here.

    Thread Starter sabkor

    (@sabkor)

    Figured it out with the help of this bug post:
    https://github.com/WordPress/gutenberg/issues/3369

    Using the REST API for the custom post type also requires that the taxonomy itself be registered to use the REST API.

    So, along with:
    /includes/sp-news-post-type.php
    Line 45 (from): ‘taxonomies’ => array(‘post_tag’)
    Line 45 (to): ‘taxonomies’ => array(‘post_tag’, WPNW_CAT)

    the following line has to be added to the taxonomy registration in the $args = array( section:
    ‘show_in_rest’ => true,

    All is working as expected now (for me).

    Plugin Author Anoop Ranawat

    (@anoopranawat)

    Hello @sabkor

    Thank you so much for your help and feedback. We will check this issue and update the plugin today only.

    Plugin Author Anoop Ranawat

    (@anoopranawat)

    Hello,

    We have updated the plugin ?? Can you please update and send us your feedback.
    Also there is no need to change the line Line #45

    Thread Starter sabkor

    (@sabkor)

    Updated and all is working great. Thanks!

    Thanks as well for the recognition in the patch notes ??

    Plugin Author Anoop Ranawat

    (@anoopranawat)

    Hello @sabkor,

    If you like our support and plugin, please share your rating and review ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘No Categories’ is closed to new replies.