Support » Networking WordPress » Use first taxonomy in other multisite blogs

Viewing 15 replies - 1 through 15 (of 33 total)
  • okay it is working partly
    however there is one database entry named wp_3_clpr_storesmeta and it has to overite wp_3_4_clpr_storesmeta unfortunately if i use

    add_action(‘init’, ‘central_taxonomies’);
    add_action(‘switch_blog’, ‘central_taxonomies’);

    function central_taxonomies () {
    global $wpdb;

    $wpdb->clpr_storesmeta = $wpdb->base_prefix.”clpr_storesmeta”;
    it does not help at all

    it worked with othe database tables like

    add_action(‘init’, ‘central_taxonomies’);
    add_action(‘switch_blog’, ‘central_taxonomies’);

    function central_taxonomies () {
    global $wpdb;
    $wpdb->terms = $wpdb->base_prefix.”terms”;
    $wpdb->posts = $wpdb->base_prefix.”posts”;
    $wpdb->term_relationships = $wpdb->base_prefix.”term_relationships”;
    $wpdb->postmeta = $wpdb->base_prefix.”postmeta”;
    $wpdb->term_taxonomy = $wpdb->base_prefix.”term_taxonomy”;

    need help 🙁

    In THEORY if you make the custom taxonomy, toss it in an mu-plugin file, it’s all you need.

    Dear Mika,

    thanks for you suggestion, however how do i accomplish that?

    I am new with multisite…..

    Make a taxonomy the same way you’d make it for a single site.

    Instead of putting it in a functions file, or a plugin, put it in a file in the mu-plugins folder. We can help you with step 2, but you need to sort out step 1 first.

    well thanks but it is not so easy, the taxonomy is created by a theme and now i would like to get part of it displayed on another blog with the same theme but a modified design…
    I am really new with multisite and totally lost right now…

    That would be because you’re making the common mistake of doing everything at once.

    Stop 🙂 Relax a little. Now I will note, if you’re new with WordPress, this is going to suck. Multisite is not for the novice.

    So let’s get working. Does the taxonomy in the THEME work already?

    If so, and you want a similar, but different, taxonomy, then you need to use a different theme with that taxonomy edited. Otherwise, just use the same theme and you get the same taxonomy.

    (note: My answers change because you’ve provided more information)

    hi there and thanks, yes taxonomy is working on both blogs (both with the same theme, just minor cosmetic differenc)

    I now need to get all posts with post_type “coupon”

    i was able to get alle other items with this:

    add_action('init', 'central_taxonomies');
    add_action('switch_blog', 'central_taxonomies');
    function central_taxonomies () {
    	global $wpdb;
    	$wpdb->terms = $wpdb->base_prefix."terms";
    	$wpdb->term_relationships = $wpdb->base_prefix."term_relationships";
    	$wpdb->postmeta = $wpdb->base_prefix."postmeta";
    	$wpdb->term_taxonomy = $wpdb->base_prefix."term_taxonomy";
    	$wpdb->storesmeta = $wpdb->base_prefix."clpr_storesmeta";

    i put this in a plugin but if I add $wpdb->posts = $wpdb->base_prefix.”posts”;
    it pulls all posts and pages from blog1 however i only need posts with the post_type “coupon”

    I also tryed your Tipp with the switch_to_blog but i didnt get any results and i couldnt find anny good explanation in the web!

    Feeling stupid right now

    I now need to get all posts with post_type “coupon”

    Is this a NEW taxonomy?

    Is it going to live in the THEME or does it need to be separate?

    (Switch to blog does not apply here yet… It may never)

    no they are all in wp_3_post

    post_type is a field in wp_3_post and these posts have to be displayed in blog2

    the other post_type categories with in the wp_3_posts (sorry not wp_3_post) are nav_menu_item, page, post, revision and coupon

    no they are all in wp_3_post

    That doesn’t answer anything.

    Is this a NEW taxonomy or are you just editing the existing one to alter it?

    Is this taxonomy defined in the theme for all sites who use this theme?

    Sorry no there is no new taxonomy

    wp_3_post is from blog1

    is from the blog that needs to display the post_type “coupon” from wp_3_post (blog1)

    … What?

    wp_3_post is the posts table for Blog #3 on your network.

    Look, I don’t think you understand enough about taxonomies to start with. Let’s rewind.

    What, in PLAIN simple english, are you trying to do? What I THINK is this: You have a theme with a custom taxonomy which is in use on a site in your network. You want the SAME taxonomy to be active on another site, plus an additional (new) taxonomy you have yet to create.

    Is that even CLOSE to right?

    thanks but i am sure wp_3_posts is the basic blog and blog wp_3_4_posts is blog 4 dont ask me why.

    i would like to post all posts within wp_3_posts with post_type “coupuns” postet in Blog 4 the theme i storing items in diffrent taxonomys and partly in wp_3_posts and the only problem to just get this post_type displayed in blog 4

    sorry it sounds real complicated

Viewing 15 replies - 1 through 15 (of 33 total)
  • The topic ‘Use first taxonomy in other multisite blogs’ is closed to new replies.