Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Enrico Battocchi

    (@lopo)

    Hi,
    it should be fully compatible, I’ve tested it on a Multisite installation.

    If you try it and find any problems, feel free to report them so I can fix!

    dunc

    (@dunc)

    Hi,

    I’m using it on a multisite and may have come across a problem.

    I have a custom post type. After cloning a post the original becomes unavailable to get_post().

    Here’s an example:

    You can see both products in search results (the version with ‘NRC/CAC’ in the name is the clone):
    http://www.globalgreentag.com/?archive_template=search.php&s=Fissured&post_type=products

    Here is a single page template for the CPT ‘manufacturers’ with a get_post() at the bottom to display posts from the CPT ‘products’ based on a taxonomy. Only the clone ‘NRC/CAC’ is shown:
    http://www.globalgreentag.com/manufacturer/armstrong-world-industries-ceiling-division/

    This product is missing (the original):
    http://www.globalgreentag.com/products/fine-fissured-fine-fissured-planks-and-fine-fissured-high-nrc/

    In the search results you can see they both have the same manufacturer (taxonomy) so they should both appear on the manufacturer page above.

    We have numerous examples and the common thread is that it’s the original that goes m.i.a.

    Here’s a copy of my get_post() code that I’m using on my single manufacturer template :

    <?php
    global $post;
    $slug = get_post( $post )->post_name;
    
    $manproducts = get_posts( array(
    	'numberposts' => -1, // we want to retrieve all of the posts
    	'post_type' => 'products',
    	'manufacturer' => $slug,
    	'suppress_filters' => false
    ) );
    
    if( $manproducts ) {
       ?><h3>Products</h3>
    <div class="post-grid">
    <div class="grid-items">
    <?php
          foreach ( $manproducts as $manproduct ) {
             ?><div class="item">
    <div class="layer-media">
    			<?php if ( has_post_thumbnail( $manproduct->ID ) ) { ?>
    				<a href="<?php echo get_permalink( $manproduct->ID ) ?>" title="<?php echo get_the_title( $manproduct->ID ); ?>">
    					<?php echo get_the_post_thumbnail( $manproduct->ID, 'medium' ); ?>
    				</a>
    			<?php } ?>
    </div>
    <div class="layer-content">
    <h4><a href="<?php echo get_permalink( $manproduct->ID ) ?>" title="<?php echo get_the_title( $manproduct->ID ); ?>"><?php echo get_the_title( $manproduct->ID ); ?></a></h4>
    </div>
    </div>
    
    <?php
          }
       ?>
    </div>
    </div>
    <?php
    }
    
    wp_reset_query();
    ?>

    FYI – I’m using the plugin CPT-onomies to create the ‘manufacturer’ CPT and Taxonomy.

    Any ideas?

    Thanks!
    – Duncan

    Plugin Author Enrico Battocchi

    (@lopo)

    Hi,
    It seems that the products list shows both the original and the clone. So probably there’s something in your call to get_posts?

    If you can edit the code you’ve posted, I would suggest these tests:

    • use tax_query instead of the “direct” taxonomy reference 'manufacturer' => $slug, as it is deprecated since WP 3.1
    • try to set 'suppress_filters' => true to see if there is some filter that hacks the result

    Can you try these and tell me if they fix or at least if there’s some progress?

    dunc

    (@dunc)

    tax_query fixed it. Thanks for the tip about the deprecated code @lopo.

    So to answer OPs question, yes working fine on multisite.

    Plugin Author Enrico Battocchi

    (@lopo)

    Glad to hear that!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Fully Multisite compatible? anyone using on Multisite network enabled?’ is closed to new replies.