WordPress.org

Forums

Sitewide Tags changes permalink only of custom post type (1 post)

  1. Chuscastilla
    Member
    Posted 4 years ago #

    Hello.

    I'm running a WordPress Multisite subdomain based upgraded from MU.
    I usually use Sitewide Tags to pull posts to the main blog (http:/mainblog.com) with no problems.
    In a new subdomain (http:/blog4.example.com) I decided to use a custom post type with 7 custom taxonomies, one of them hierarchical.
    My custom post types appears in the blog4 like this:
    http:/blog4.example.com/see/CPT-title.
    I want that these custom post type appear (as regular posts from the other subblogs) in the mainblog.
    As this type of post does'nt exist in the mainblog, I created it in this mainblog with the same properties that the one in blog4.
    Doesn't work.
    I supposed that something in the plugin Sitewide Tags should be added to take my CPT.
    I searched on google and found some other people with the same problem but no answers.
    Boone Gorges proposes a function that adds this custom post type here:

    function add_product_type( $allowed_post_types ) {
    $allowed_post_types['product'] = true;
    return $allowed_post_types;
    }
    add_filter( ‘sitewide_tags_allowed_post_types’, ‘add_product_type’ );
    ?>

    It almost worked. Now, if I create a regular post in blog4, it is pulled to the mainblog, with the permalink:
    http://blog4.example.com/regular-post-title
    But when I create a "product" type in blog4 is pulled as well, but with the permalink changed to:
    http:example.com.index.php/cpt-title

    I'm not an expert in php, (nor in english, sorry but getting better in both), and I don't know why this happens.

    Don't know if it is because of it's a mu upgraded, mainblog or subblog permalink configuration, rewrite slug in the creation of the custom post type, htaccess misconfiguration, even I've read about a php imposibility because a problem with cache and "switch to blog"..

    I'm lost, so any help is very appreciated. Thanks in advance..

Topic Closed

This topic has been closed to new replies.

About this Topic