Autoblog saving auto tagged with taxonomies

Can you make autoblog saved rss items with custom taxonomies (not standard wp ones)? Also, can you group rss feeds or do they remain separated one by one?

Thanks.

  • aristath
    • Recruit

    Hi davhad and welcome to the WPMU DEV Community!

    The default behavior is to assign tags. You can "tweak it" to support your custom taxonomies (I haven't tried it so I can't guarantee success on this!)

    If you're familiar with PHP, you can take a look at the autoblogincludes/classes/autoblogprocess.php

    If you need any assistance don't hesitate to post back here. :slight_smile:

    Cheers,
    Aristeides

  • davhad
    • Design Lord, Child of Thor

    Ok, not too familiar with php, and the abiliity to add taxonomies (not just tags) would save us - and I presume plenty of other users - lots of time since the autoblogged posts should feature only under specific pages related to the topic. And those pages are organized by taxonomies.

    How can I add that functionality given my limited understanding of php? Are there any patches?

    Thanks.

  • aristath
    • Recruit

    @davhad you can use the CustomPress plugin to add new custom post types, taxonomies or whatever you want to do. :slight_smile:

    As for using your custom taxonomies, with the autoblog, plugin, I saw this piece of code in 2-3 places in the plugin's code:
    get_terms( 'post_tag', '' );

    My guess is that you could simply do a search-and replace on all files:
    Search for post_tag and replace it with your custom taxonomy's slug.

    @Barry am I correct in assuming this?

  • Barry
    • DEV MAN’s Mascot

    You should only need to change a single line in the autoblogprocess.php file (line 853) which is:

    $tax_input = array( "post_tag" => $tags);

    This sets the taxonomy that is passed to wp_insert_post to add in the processed post. Changing "post_tag" to the name of your custom taxonomy *should* put the tags in that taxonomy.

    Note: not tried it myself, but I can't initially see any reason why it wouldn't work.

  • davhad
    • Design Lord, Child of Thor

    Hey @aristathbarry & @aristath, thanks for the response.

    I will check out Custom Press. Regarding auto tagging Autoposts with taxonomies. The single line change seems like a decent solution.

    In this case there are three taxonomies with slugs: region, topic, & activity. How specifically should I change the code below to accomodate for this case. Sorry, maybe it's a very basic question but I just started touching php a week ago from python.

    $tax_input = array( "post_tag" => $tags);

    Also, the only file visible to me in the plugin edit view in wordpress is autoblog/autoblogpremium.php and the license.txt file. Any idea on what I need to do to be able to edit the autoblogprocess.php file at line 853? Ideally from within wordpress itself?

    Thanks,

  • Barry
    • DEV MAN’s Mascot

    In this case there are three taxonomies with slugs: region, topic, & activity. How specifically should I change the code below to accomodate for this case.

    It depends on how you want to add tags? If it's selective then you would need to add in come code to determine which taxonomy to use - without more details it would be hard to advise more.

    Also, the only file visible to me in the plugin edit view in wordpress is autoblog/autoblogpremium.php and the license.txt file. Any idea on what I need to do to be able to edit the autoblogprocess.php file at line 853? Ideally from within wordpress itself?

    You really, really, really shouldn't be editing live on the server. One syntax error and you would bring your entire site down and lock yourself out of the editing page in order to fix things.

  • davhad
    • Design Lord, Child of Thor

    Hey Barry, thanks for the top about wordpress file editing. I think you're suggesting having a local dev environment to test in before ftp'ing the code to the server.

    Regarding the custom taxonomies, I just wanted to give you the necessary context. For each feed we setup with the Autoblog plugin, we would be able to select one or more values for each of the taxonomies available in our wp. From a ui perspective this probably means a combo box to select the taxonomy name, and then based on the selection, having checkboxes for each of the tags under that taxonomy.

  • aristath
    • Recruit

    @davhad the solution we suggested earlier (replacing a single line of code) would only allow you to use one of your custom taxonomies, it will not allow you to choose among a list of custom taxonomies!

    It simply "replaces" tags with your custom taxonomy.

    Are you absolutely certain that these custom taxonomies are necessary for your site's structure?

    From personal experience I have (quite painfully) discovered that the simplest approach is usually the better. Especially when it comes to a site's structure!

    Cheers,
    Ari.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.