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?
Anywhere should be fine as long as it’s not inside another function.
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?
You are adding the post type support before you add the post format support to the theme
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’ );`
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?
// 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
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?
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.
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.