Anpress point to WP Categories?
I am developing a site and it revolves around Anspress. I have a BNWF plugin that utilizes WP Categories to fire off notifications of a new post.
The issue I’ve ran across is that with Anspress categories add on, it creates an entire new category type. I added the category add on in order to have the category drop down appear on the submit a question form.
I was wondering if it is possible to point the Anspress Categories to the default WP Categories (that all the notifications are tied to) so that when a new question is submitted the notifications are fired off for that category. I have something like 75 different categories there.
wadethefade Answered question
Add this to your theme functions.php
add_filter( 'ap_addons', function( $addons ){ $addons['my-category.php'] = array( 'name' => __( 'My Categories', 'anspress-pro' ), 'description' => __( 'Add question_label taxonomy for labelling questions.', 'anspress-pro' ), 'path' => ANSPRESS_ADDONS_DIR . 'my-categories/category.php', 'pro' => true, ); return $addons; } );
Make sure to replace file name in this code.
wadethefade Posted new comment
I have my new categories addon in here:
/addons/wpcategories/
I’ve made the code change to the functions file and changing the line:
‘path’ => ANSPRESS_ADDONS_DIR . ‘wpcategories/categories.php’,
This has no change.
I am assuming my gist was alright, and all the current changes you’ve had me to up to this point are still in affect.
I am really trying to understand the file, and I get a little of what is going on, but the addon within a plugin is alluding me.