• Resolved thillcafex

    (@thillcafex)


    Hi, we’re looking to allow users to subscribe to a section of the basepress knowledge base.

    A lot of WordPress notification plugins use the category field to isolate changes, but basepress knowledgebase posts do not use this field, so I can’t see how to isolate particular articles.

    Is there a way to notify users of new articles we add to a section of the knowledgebase, rather than subscribing to every change made across our site?

    This allows users to target changes they want to be notified of.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author BasePress

    (@codesavory)

    Hi @thillcafex,

    can you please specify what you mean with “category field”?

    Thanks

    Thread Starter thillcafex

    (@thillcafex)

    Hi @codesavory, thanks for a quick response.
    I meant “Post Category” like: Blog/News/Personal
    https://www.wpbeginner.com/glossary/category/

    Most subscription tools can specify a Category. So users can subscribe to: News.
    But, I don’t think those are on the BasePress taxonomy.

    I’m looking for a way to let users subscribe to a particular section of our KB.

    Cheers,

    Plugin Author BasePress

    (@codesavory)

    Hi,

    categories(a taxonomy) are by WordPress default limited to Posts(a post type) only.
    BasePress uses a custom taxonomy called “knowledgebase_cat” and a custom post type called “knowledgebase”.
    If the subscription plugin can work with custom post types and taxonomies then they should be able to work with BasePress.
    If the subscription plugin needs you to access the default WordPress taxonomy screen you can do that by visiting the Sections edit screen, click on the pencil icon to edit a section and at the bottom of the panel that opens click on “View more”.

    That being said, BasePress Premium as a content restriction feature which allows you to specify which user can view any article. This is done via user roles.
    https://codesavory.com/knowledge-base/basepress/features/content-restriction/

    While at the time of writing the content restriction works on articles only it would be soon extended to manage whole sections and Knowledge Bases as well.
    This does not include notifications though.

    I hope this helps!

    Thread Starter thillcafex

    (@thillcafex)

    Hi,
    Thanks again,
    I think I found a way to do what I needed, although it might not be entirely recommended, I thought I’d share it.

    I couldn’t find any notifications plugins that could work with custom taxonomies. Some look at custom posts, but that would mean I’d send notifications for all new knowledgebase articles, that’s not what we wanted.

    I added ‘category’ to the knowledgebase taxonomy array (in class-basepress-cpt.php). This lets me define a category for a knowledgebase post.

    The notification plugins check for posts that match the category. It worked. As far as I can tell, it didn’t break anything. It’s probably brittle doing it this way because any update to BasePress will overwrite the change, I’ll have a look at adding something to the Word Press theme instead.

    Great to hear you’re looking to add restrictions to sections and KBs too; this is actually something we are needing very soon!

    Plugin Author BasePress

    (@codesavory)

    Hi @thillcafex,

    I am happy you have found a way around this!

    That said, there is no need to change the plugin’s code to do that.
    You can easily add category support to the knowledge base adding this code to your theme’s functions.php:

    function add_categories_to_knowledgebase(){
    	register_taxonomy_for_object_type( 'category', 'knowledgebase' );
    }
    add_action( 'init', 'add_categories_to_knowledgebase' );

    You can find more info here.

    Thread Starter thillcafex

    (@thillcafex)

    Yes, that’s perfect, no need to modify the plugin.

    Thanks for the help!

    Thread Starter thillcafex

    (@thillcafex)

    Do you have a rough idea when the content restriction on whole sections and Knowledge Bases will be available? If it’s some time off, I’ll look for an alternative.

    Best wishes,

    Plugin Author BasePress

    (@codesavory)

    Hi @thillcafex,

    the extended content restriction is kind of ready.
    I am still running the last tests but it should be release within few days, next week max.

    Thanks

    Thread Starter thillcafex

    (@thillcafex)

    That’s great news, thanks for the speedy reply, We’re looking forward to giving it a try.

    Cheers!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Follow or subscribe notifications for articles’ is closed to new replies.