WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Use first taxonomy in other multisite blogs (34 posts)

  1. joloshop
    Member
    Posted 9 months ago #

    Hi I am using a coupon theme (clipper) and I have several domains thes all should use the custom taxonomy. I tryed http://wordpress.org/support/plugin/mu-central-taxonomies however it is not working. Has anybody a working solutions to use taxonomys from the first blog on all others??

  2. joloshop
    Member
    Posted 9 months ago #

    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 :-(

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

  4. joloshop
    Member
    Posted 9 months ago #

    Dear Mika,

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

    I am new with multisite.....

  5. 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.

  6. joloshop
    Member
    Posted 9 months ago #

    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...

  7. 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)

  8. joloshop
    Member
    Posted 9 months ago #

    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

  9. 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)

  10. joloshop
    Member
    Posted 9 months ago #

    no they are all in wp_3_post

  11. joloshop
    Member
    Posted 9 months ago #

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

  12. joloshop
    Member
    Posted 9 months ago #

    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

  13. 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?

  14. joloshop
    Member
    Posted 9 months ago #

    Sorry no there is no new taxonomy

    wp_3_post is from blog1
    and
    wp_3_4_post

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

  15. ... 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?

  16. joloshop
    Member
    Posted 9 months ago #

    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

  17. i would like to post all posts within wp_3_posts with post_type "coupuns" postet in Blog 4

    You want to MOVE them? Or sync them... or ...?

    Note: Because this is so messy I'm trying to take it one question at a time :) Let's keep it as simple as we can for right now. Makes it easier to understand when we're not in your head ;)

  18. joloshop
    Member
    Posted 9 months ago #

    thanks Mika for hangin in,

    okay this is the situation I have a coupon site with more than 2000 coupons already,
    now i want to display them on a second domain within my multisite setup.

    Therefore i need the second domain to display these coupons.

    I got alll other information i need from the first domain via a modified plugin.
    With this content:

    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";
    }

    However if I add

    add $wpdb->posts = $wpdb->base_prefix."posts"; to it I am not just getting all coupons from domain1, i am also getting all pages, the menue and all posts.

    within posts you have the post_type and all coupons are having the ID "coupons" and this what I need to get. Is there a way to add something to

    add $wpdb->posts = $wpdb->base_prefix."posts";

    to seperate this ID "coupons" from the others?

  19. Stop showing code, eh? The point of 'keep it simple' is that if we don't clearly understand what you're actually trying to do, we give bad advice.

    okay this is the situation I have a coupon site with more than 2000 coupons already,
    now i want to display them on a second domain within my multisite setup.

    Okay. You want to MOVE them or just display them?

    Seriously this matters a LOT. Each site has separate posts tables for a reason. Calling back and forth to get data can be computationally expensive, so we want to limit it if we can.

  20. joloshop
    Member
    Posted 9 months ago #

    thanks i just would like to display them

  21. Okay, good. Now you have some options :)

    http://wordpress.org/plugins/network-shared-posts/ would be the easiest. No code needed for you.

  22. joloshop
    Member
    Posted 9 months ago #

    thats what i tried first, however thereare over 2000 posts (coupons) i need to share and there is no way to edit them all to include the shortcode. If I understand right thats what i have to do......

  23. 1) You DO NOT want to list all 2000 on one page. No matter what, you will CRASH your server. And no, you don't want to duplicate the data, you'll be hit by SEO penalties.

    2) Looking at this screenshot, you can determine how many posts to show

    http://s.wordpress.org/plugins/network-shared-posts/screenshot-2.png?r=781386

    So you would always show SOME coupons, and link back to the coupon site so people see the rest.

  24. joloshop
    Member
    Posted 9 months ago #

    nope no option i need all coupons the content of the pages will be diffrent the the coupons are cust codes and short dicription like "amazon 10% discount" you will find these on hundreds of sites so i dont think there are any penalties, I am already using to domain and using Mini-Mu plugin but with this i am unable to change the permalink structure and pages structure. And by now google is searching both sites and listing bot sites with out panalties....

  25. You're doing this wrong....

    Those other sites? They're not calling the WHOLE post from another stand-alone website like you are.

    Making a link back to the coupon site would be the best way about it. Dynamically coding to search the coupons for one that matches would be good for that link too.

    Duplicating the whole post?

    Bad. Bad. Bad.

  26. joloshop
    Member
    Posted 9 months ago #

    you dont understand it is NOT a hole post and it will not show on a single page, it will always show up on a store page and these pages are diffrent the coupon is not really a post and i know of coupon site doing the same as i am trying to do the coupon itself is just saved like a post....

  27. you dont understand it is NOT a hole post and it will not show on a single page

    Then please explain this better. And STOP getting into the code. Explain this in simple, non-technical, terms. Like you're trying to tell a visitor to your site :)

    What it SOUNDS like you're saying is this: "I want to show the post of a coupon from my coupon site onto another."

    But then you go and say you want to show the coupon itself... so are you trying to say you want to LINK to the coupon from this other site?

  28. joloshop
    Member
    Posted 9 months ago #

    okay thanks for hanging in....

    a post within the wp_post database is labeld as post_type "post"
    a coupon within the wp_post database is labeld as post_type "coupon"
    a page within the wp_post database is labeld as post_type "page"

    Now i want to get all post_type "coupon" from the mainblog (blog1) to show in blog2!
    And not as a link!

  29. Now i want to get all post_type "coupon" from the mainblog (blog1) to show in blog2!
    And not as a link!

    There are some options.

    1) You want to MOVE the posts (so that coupons now live in Blog2
    2) You want to DUPLICATE the posts (so the same post is in Blog2 and Blog1)
    3) You want to EMBED the posts (so the post lives in Blog1, but you can display it ad-hoc on blog2)

    I want to tell you something VERY IMPORTANT. The only way to do with that will not cause your SEO to sink like the Titanic is if you either MOVE everything (option 1) or if you embed excerpts of the coupons and have the full content accessed by a link.

    Any other way will end with Google tagging you a spammer.

    Yes, I'm an expert in this field. Yes, I know what I'm talking about. No, the 'other sites' you mentioned aren't doing it the way you're trying to.

    The reason you can't do this without tanking your search ratings is because Multisite is multiple SEPARATE sites. Google gets that. Google will see "Aha, Site1 has POSTS. Site2 has THE SAME posts! He's duplicated content! This is bad! We don't like this."

    Google has absolutely no way to know that those posts are 'coupons' and thus 'special.' Google knows "This is content. It is the exact same on multiple separate sites. Ergo it is spam."

    Do you understand now why I'm telling you not to do it that way, and why I keep pushing alternatives?

  30. joloshop
    Member
    Posted 9 months ago #

    okay I understand your concerns, just explain this.
    Behind this 3 domain (and there are more) is the same database, you can get access to there database and you are getting the codes and text:

    http://www.gutscheindrache.de/otto/
    http://www.clever-tanken.de/gutscheine/otto/
    http://www.gutscheinrausch.de/otto/

    look at the coupon and order and they all the same, everything else on these sides is diffrent and thats my plan! To publish my coupons on my sites within diffrent content!

Reply »

You must log in to post.

About this Topic