Related Words for Categories
-
I like your plugin in that it is great for auto-blogging. Any plans to have the plugin work for categories like you do for tags? I would like to look at the incoming title and have it automatically set both my tags and categories. Right now it’s just doing it for tags. Thanks
-
Sure – the version 1.6 will support custom taxonomies. It’s not going to be very user-friendly though (in order to add both tags and categories users will have to run two instances of the plugin) because there are more important things that need to be implemented in that release.
Sounds good. When you think 1.6 will be out?
It may take a few weeks, a month or maybe even two. Honestly I don’t know – there is still a lot of things on my to-do list. Proper testing will also require some time.
Do you know of another plugin that does it for categories? I can’t seem to find one.
In this thread (which can help you if you want to modify the plugin yourself to add categories instead of tags) somebody also posted a link to this plugin which should be able to do what you want – but I haven’t tried it so I don’t know if it actually works.
Hi,
I took a look at the thread you mentioned and it gets a little confusing for me…sorry.
So I hope you can provide some simple steps needed to convert the plugin to work with categories instead of tags. I’ll still be using your original APT plugin for tagging, so please, if you can, show me how to modify the plugin for categories so that it doesn’t conflict with the original plugin.
This is what I’ve gathered so far.
1) That we need to modify the original plugin’s code and that we can run the two plugins simultaneously, one for tagging and one for setting categories. That’s fine with me, but I need to know how to modify the plugin.
2) So far I understand that we need to replace all occurrences of “apt_” with something like “abc_”. This will rename the added option names and the custom database table.
3) Then I understand we need to rename the plugin to something else. Where do we do that or do we? Maybe that is what the step above does?
4) And I gather that we need to change the “post_tag” parameter to “category”. I see someone mentioned to find all mentions of ‘post’ and change those to ‘category’. Can you tell me which lines to do that on? Or can I simply do the Find/Replace function to change all the mentions of ‘posts’ to “category’?
5) Then I see the same person mentioned to look for ## ADDING TAGS TO THE POST, then to add something like:
foreach ($apc_tags_to_add_array as $apc_cat) { $term = get_term_by('name', $apc_tag, 'category'); $apc_tag_ids[] = $term->term_id; }
Where exactly would we add that? Would it go right after the line that says ## ADDING TAGS TO THE POST?
6) Then he said to replace
wp_set_post_terms($post_id, $apc_tags_to_add_array, ‘category’, true); //append tags
with…
wp_set_post_terms($post_id, $apc_tag_ids, ‘category’, true); //append tags
And to repeat it with the same function immediately below. I see that but want to make sure.
Instead of being all over the place, can you please list the steps needed to modify the plugin so that works along side the original APT plugin.
The whole process is not clear on that thread so was hoping you could clear it up here with a few simple steps.
Thanks
Here’s a modified version of APT v1.5 I just put together – it should be able to add (already existing) categories to posts:
https://devtard.com/wp-content/uploads/2014/05/apt-modified.zip
Unfortunately I don’t have time to properly test it or make it more user friendly. Check it out and let me know if it works for you.
And if you have any suggestions or comments, please tell me – I probably won’t be able to tweak everything for you but I will take them into account before releasing 1.6 (which already supports custom taxonomies).
(You can use a diff tool to see what has been changed in comparison to the version 1.5.)
Yes, that is what I want…to add already existing categories to posts. Now since I already have APT installed on my site, how do I install this modified version? Do I have to deactivate/remove the orginal version fist, then install/activate this one?
Thanks
All prefixes, DB names etc. have been changed so it should be safe to run both plugins at the same time. There’s no need to deactivate the original plugin.
It may be a good idea to make a backup of all your data though (just in case something goes wrong).
Sounds good. I will backup everything, then install this plugin and let you know how it goes. I might have a few suggestions. Thanks
I backed up everything and loaded up your modified version of the plugin. I see that the backend still needs some language clean up but so far so good. I would recommend that when it does the ‘Import Existing Tags/Category” function that it pre-fills the ‘Related Words’ right column with the same data that it shows on the left column for the different ‘tag/category names’. I think most the keywords we would be looking for in the title would also be used for our tags and categories. I might be wrong, but I have over 230 categories and it would be a pain to copy all of them over one-by-one. I guess I could go into the database table and do it from there. Another suggestion is to maybe have an option next to the ‘Import Existing Tags/Category” button asking if we wanted to our right side column match our left side imported column. Don’t know how you would word that or even if it’s possible to be done in the first place, but that’s my suggestion so far.
I will play around with the rest of it and see how it works with my auto-blogger. FYI, I am importing videos from RSS feeds and so far it tags the videos fine with APT. I want to see if it will properly categorize them too by doing a title scrub for the selected keywords. If it works out, then I might not have to run 230+ different campaigns with my autoblogger just to get the videos to go into the right category. I hope to be able to run just one campaign and have your modified version of the plugin post the videos to the right category as they are being pulled from the feed.
I will report back on how it goes. Thanks
I would recommend that when it does the ‘Import Existing Tags/Category” function that it pre-fills the ‘Related Words’ right column with the same data that it shows on the left column for the different ‘tag/category names’. I think most the keywords we would be looking for in the title would also be used for our tags and categories. I might be wrong, but I have over 230 categories and it would be a pain to copy all of them over one-by-one. I guess I could go into the database table and do it from there.
Another suggestion is to maybe have an option next to the ‘Import Existing Tags/Category” button asking if we wanted to our right side column match our left side imported column.
Why would you want to have both the keyword names and related words the same? (APT v1.5 looks for both in posts – this can be changed in v1.6 BTW)
I’m not exactly sure what you want to do. Could you please elaborate more on this?
Let’s say the post title contains the keyword “Incredible Hulk”. I would want that to be posted in the ‘Incredible Hulk’ category. We might have another video titled with the keyword “Incredible Adventures” so I don’t want that to go to the “Incredible Hulk” category, but to the “Incredible Adventures” category. Of course this would all be setup in the settings.
Remember I am dealing with importing movies so it might not be the same for everyone. But for me, it would be a heck of a lot easier if ‘Importing Existing Categories’ to have the right column filled with keywords that match the left column of categories.
Not always will it be like that, so it’s nice to be able to adjust the wording with the way you have it in the keyword column. If it started with the exact match, then I can always add more keywords to it or take some of the pre-filled keyword and modify it. But having the first keyword displayed to match the category would make things a lot easier.
Also, like before, it would be good to increase the character limit of the keyword column to more than 255 characters. Some categories would have a lot of different keywords going into them so maybe set the limit to around 5000 or so.
Hope it clarifies things a little.
Another update…
I ran a campaign with my autoblogger and the issue seems to be with it rather than your plugin maybe. The autoblogger doesn’t have a way to disable posts from going to a certain category. It defaults to ‘uncategorized’, which probably makes sense. There isn’t an option for choosing ‘None’ or ‘Don’t Categorize’, so when it runs it’s posting to ‘uncategorized’ every time. Your plugin doesn’t seem to pick it up before all that happens. I was hoping it would correct the category before the final posting, but it doesn’t. I might have to get with the autoblogger Dev and see if they can make it an option to select “none” on their tool for category, but they will probably want all misguided posts to go to ‘uncategorized’.
Do you see a way to get past that? Maybe I should try it with different settings at the top. Maybe select “Replace old tags with newly generated tags”. Will be right back.
Yepper by selecting “Replace old tags with newly generated tags” it did the trick. Now it auto-blogs and goes to the right category with the right tags using both APT and your modified version of the plugin for categories. This is better than using WP Robot. I’m stoked.
I really don’t have any suggestions from here other than what I mentioned above. Super Thanks!!
- The topic ‘Related Words for Categories’ is closed to new replies.