[resolved] Custom Post type Filers for Sitewide Tags plugin (4 posts)

  1. just2izy
    Posted 4 years ago #

    I have looked around other forum posts implementing this and thought the code below should work. It causes a white screen, I checked the code as much as I can.... Any help?

    function my_swt_post_type_filter( $ig_postypes ) {
    	$ig_postypes = array('deal');
    	return $ig_postypes;
    	function my_swt_custom_tax_filter( $ig_taxonomies ) {
    	$ig_taxonomies = array('deal_categories','dealtype','deal_location','cities');
    	return $ig_taxonomies;
    	add_filter( 'sitewide_tags_custom_taxonomies', 'my_swt_custom_tax_filter' );
    	add_filter( 'sitewide_tags_allowed_post_types', 'my_swt_post_type_filter' ) ;
  2. just2izy
    Posted 4 years ago #

    SEE this Forum Topic

  3. just2izy
    Posted 4 years ago #

    Hmmm. Seems I celebrated too soon. Here's what I posted to the other forum topic.

    So, I finally managed to get it to work with SWT using a bit of your method and trial and error.

    What I have now is, it does not matter WHERE you place the code for the filters ( I could be wrong) as long as you do it as one of Ron's suggested ways; mu plugins, plugin network activated, plugin in child theme, functions.php on sub-blog theme.

    See this Post on WPMUTutorials

    I opted for the method to use it in the functions.php in the sub-blog theme.

    Now comes the nearly tearing hair out part. Populating the posts works but remember its a CPT. You need to add support in the main blog (or tags blog) for the Custom Post Type.

    I did that using the Custom Post UI plugin.

    Soon as the CPT was created, I click it and there is the post already sitting there waiting. It was sitting in the DB waiting for a way to show up in the Admin Interface.

    DoctorDR, does this give you any ideas to solve fro Post Formats. Is the Tumblog plugin installed on both sub-blog + main blog (or tags blog). Is Post Formats supported in sub-blog + main blog?

    with CPT I had to add support for CPT must smn similar happen for Post Formats?

    Sorry I'm sure you answered those ques already, tired, sleepy so forgive me.

  4. stoi2m1
    Posted 4 years ago #

    Im looking at limiting the site wide tag plugin to just one custom post type. Is that what you have done here? And I could use a little explanation of what the custom taxonomy filter is doing for you. Thanks...

Topic Closed

This topic has been closed to new replies.

About this Topic