WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Sitewide Tags Pages
Post Format not passed through to main site (26 posts)

  1. wadams92101
    Member
    Posted 1 year ago #

    When MU Sitewide Tags plugin doesn't seem to be passing through my post format (status or image) to the main site. What might be the problem?

    http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/

  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    You may want to fill in the blanks a bit with what code you have, etc.

    SWT doesn't pass through post format by default.

  3. wadams92101
    Member
    Posted 1 year ago #

    Thanks Ron. I'm using the Genesis News Child theme (version 2.01). This is what I have in my theme's functions.php:

    // WAA - ADD POST FORMATS
    add_action( 'after_setup_theme', 'news_formats', 11 );
    function news_formats(){
         add_theme_support( 'post-formats', array( 'status', 'video', 'image', 'link', 'gallery' ) );
    }
    // add post-formats to post_type 'page'
    add_post_type_support( 'page', 'post-formats' );

    It seems to be passing it through on the other site but not on this site.

  4. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    You also need the filter in this post http://wordpress.org/support/topic/getting-buddypress-and-sitewide-tags-to-play-nicely?replies=46#post-2127136

    If all of your sites use the same theme then you can add that to the theme functions file.

  5. wadams92101
    Member
    Posted 1 year ago #

    Thanks Ron. I added the following after the above but it didn't work.

    add_filter( 'sitewide_tags_custom_taxonomies', 'my_swt_custom_tax_filter' );
    function my_swt_custom_tax_filter( $taxonomies ) {
    	$taxonomies[] = 'post_format';
    	return array_unique( $taxonomies );
    }

    Did I miss something? (Strangely, it also seemed to trigger a false plugin update notification for the linkable title & php widget plugin by Lamb-whatever. It went away when I removed the above)

  6. wadams92101
    Member
    Posted 1 year ago #

    Ron, In the thread you referred me to http://wordpress.org/support/topic/getting-buddypress-and-sitewide-tags-to-play-nicely/page/2?replies=46#post-2131772, Ipstenu says:

    I know that SWT can pull in post FORMATS (like links and asides) . . .

    That is exactly what I want but it doesn't conform to my experience or your words above. Also, there is some discussion about putting the filter in an MU-Plugins plugin. Is that what is missing in my attempt? I put it in functions.php because, as you said, I'm using the same theme on all my sub-blogs, but that didn't work, and it created some other weirdness like the false notification mentioned above and it seemed to really slow down my site.

  7. wadams92101
    Member
    Posted 1 year ago #

    Ron, I tried to put the above code in an mu-plugins folder plugin and it caused server errors HTTP Error 500 (Internal Server Error). I'm not a coder so maybe it was a syntax error but I don't think so. Any ideas?

  8. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    I know that SWT can pull in post FORMATS (like links and asides) . . .

    @Ipstenu did not say it did it out of the box just that it can pull post formats... using the snippet of code I linked to above.

    If you are getting a 500 error then most likely your browser converted the quotes to encoded quotes. Paste the code into a text editor, recopy the text in the text editor and paste into your other file.

  9. wadams92101
    Member
    Posted 1 year ago #

    Hi Ron:

    Paste the code into a text editor, recopy the text in the text editor and paste into your other file.
    I did this and tried again. Still no luck. I tried it both in functions.php and as a separate mu-plugins plugin (with latter still producing a 500 error). Any other thoughts?

  10. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    It's small enough you could try just typing it into the file manually.

  11. wadams92101
    Member
    Posted 1 year ago #

    Hi Ron: Which file do you recommend trying it in first? Functions.php or a separate plugin in the mu-plugins file? (only the latter was causing HTTP 500 errors)

  12. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    Try functions.php in the theme on the source site.

  13. wadams92101
    Member
    Posted 1 year ago #

    It's small enough you could try just typing it into the file manually.

    Still didn't work - Post format type is not passed through to main blog.

  14. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    That filter will not affect existing posts, only new ones.

  15. wadams92101
    Member
    Posted 1 year ago #

    Thanks Ron. I figured as much so I tested it with newly created posts and it didn't work. What might have gone wrong?

  16. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    I just tested that filter with WP 3.5 alpha and it still works. I had a post format enabled theme on both the tags blog and the site where the post was originally published.

  17. wadams92101
    Member
    Posted 1 year ago #

    Dang, I dunno what I'm doing wrong but I tested it both on my dev site and live site and couldn't get it to pass the post format type. I was using the same theme on the child blog and main blog, and it is post format enabled on both my dev and live site. ?? Does it matter where in functions.php I place the filter?

  18. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    Anywhere should be fine as long as it's not inside another function.

  19. wadams92101
    Member
    Posted 1 year ago #

    Thanks Ron. This (below) is what I have regarding post formats in the entirety but its not working. Doesn't look its inside a function or that there's any syntax errors that I can see. `// WAA - ADD POST FORMATS
    add_action( 'after_setup_theme', 'news_formats', 11 );
    function news_formats(){
    add_theme_support( 'post-formats', array( 'status', 'video', 'image', 'link', 'gallery' ) );
    }
    // add post-formats to post_type 'page'
    add_post_type_support( 'page', 'post-formats' );

    // WAA - add filter to pass through post format types by mu sitewide tags to tags blog
    add_filter( 'sitewide_tags_custom_taxonomies', 'my_swt_custom_tax_filter' );
    function my_swt_custom_tax_filter( $taxonomies ) {
    $taxonomies[] = 'post_format';
    return array_unique( $taxonomies );
    }
    `
    Do you see any reason that this shouldn't work?

  20. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    You are adding the post type support before you add the post format support to the theme

  21. wadams92101
    Member
    Posted 1 year ago #

    Hi Ron: I'm confused. I thought that I had it in the order you suggest. Do you mean I need to move up the following: `// add post-formats to post_type 'page'
    add_post_type_support( 'page', 'post-formats' );`

  22. wadams92101
    Member
    Posted 1 year ago #

    Hi Ron: I changed and refined it to this but it didn't cure the problem:

    // WAA - ADD POST FORMATS
    add_theme_support( 'post-formats', array( 'status', 'video', 'image', 'link', 'gallery' ) );
    
    // WAA - add filter to pass through post format types by mu sitewide tags to tags blog
    add_filter( 'sitewide_tags_custom_taxonomies', 'my_swt_custom_tax_filter' );
    function my_swt_custom_tax_filter( $taxonomies ) {
    $taxonomies[] = 'post_format';
    return array_unique( $taxonomies );
    }

    Is that what you were talking about?

  23. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    // run news_formats function in a hook LATER
    add_action( 'after_setup_theme', 'news_formats', 11 );
    function news_formats(){
    add_theme_support( 'post-formats', array( 'status', 'video', 'image', 'link', 'gallery' ) );
    }
    // add the post format support NOW
    add_post_type_support( 'page', 'post-formats' );

    In that version of the code the add_theme_support occurs well after the add_post_type_support

  24. wadams92101
    Member
    Posted 1 year ago #

    In that version of the code the add_theme_support occurs well after the add_post_type_support

    Ok, that's exactly what I had before but now that I've refined it to what is recommended by the StudioPress tutorial on Post Formats by Brian Gardner, why isn't the filter you provided working?

  25. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    why isn't the filter you provided working?

    Are you expecting that it's going to work on the pages? If it's a page SWT completely bypasses the tags, categories & terms.

  26. wadams92101
    Member
    Posted 1 year ago #

    Are you expecting that it's going to work on the pages?

    No. I don't need it on pages. Just posts. When I post a post-format-status in a child blog, I'd like it to go to the main blog as a post-format-status also. However it goes up as a post-format-standard.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic