[wp-hackers] Attaching a Taxonomy on Posts?
Dion Hulse (dd32)
wordpress at dd32.id.au
Sat Jul 9 02:12:12 UTC 2011
When i say a plugin, I mean a plugin or a themes functions.php.
Usually this would do it:
add_action('init', 'some_function', 100);
function some_function() {
register_taxonomy_for_object_type( $taxonomy, $object_type );
}
but that's no guarantee.. it'll depend on the plugin.
On 9 July 2011 12:08, Vassilis Mastorostergios <vmasto at gmail.com> wrote:
> So there really is no way of doing that in the functions.php with just one
> line eh? Darn
>
>
> On Sat, Jul 9, 2011 at 5:02 AM, Dion Hulse (dd32) <wordpress at dd32.id.au>wrote:
>
>> You can include this in a plugin on a hook that runs later than
>> whatever the taxonomy is registered at (or at a "higher" priority):
>> register_taxonomy_for_object_type( $taxonomy, $object_type )
>>
>> Note however, that this doesn't mean that it'll work with all plugins
>> which are hard coded to a single post type.
>>
>> D
>>
>> On 9 July 2011 11:41, Vassilis Mastorostergios <vmasto at gmail.com> wrote:
>> >
>> > Hi all,
>> > Probably an easy question but still I need to know if there actually is a
>> > safe way of doing this:
>> >
>> > Say a plugin creates a custom taxonomy and attaches it to some custom
>> post
>> > type. Is there a safe way to attach that same taxonomy to Posts without
>> > messing with the plugin code?
>> >
>> > Thanks in advance!
>> > _______________________________________________
>> > wp-hackers mailing list
>> > wp-hackers at lists.automattic.com
>> > http://lists.automattic.com/mailman/listinfo/wp-hackers
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list