0

Ive been experiencing a problem with the new WordPress 3.1.2 update. When i use add_theme_support(); and register an array of post formats, it registers all of them fine, but when it comes to the video post format, it registers it twice, and gets called post-format-video-2.

This is the way im writing out the code:

add_theme_support( 'post-formats', array( 'aside', 'gallery', 'image', 'link', 'video' ));

Ive tested this out both on my theme, and the twentyten theme. The problem is exclusive to the video post-format. Its really strange. Additionally when you declare a "posts" format as "video" upon publishing or updating, the post-format meta box adds a new radio button with a new post format without a slug/name.

Illustration (where numbers are the radio buttons):

  1. Aside
  2. Gallery
  3. Image
  4. Link
  5. Video

Despite only showing 5 radio buttons, upon updating/publishing, a new radio button appears, and it gets selected (radio button 6) rather than the one I chose (radio button 5).

Ive used the add_action( 'after_setup_theme', 'foobar' ); on my theme with no luck. Of-course this comes standard with twentyten.

Any ideas?

13
  • First guess - do you have a term already registered called "post-format-video"? It sounds like a term with that slug must already be in your wp_terms table (maybe attached to a different taxonomy, though I can't imagine why that would be)... May 4, 2011 at 0:28
  • You should report this to the wp-hackers list and ask if you should put it on wp-trac.
    – kaiser
    May 4, 2011 at 0:32
  • @goldenapples: Yea it does exist, which is why i find it odd. There are two slugs post-format-video and post-format-video-2, with the names Video, and post-format-video respectively.
    – VicePrez
    May 4, 2011 at 1:20
  • @kaiser: will do. Thanks for the suggestion. Maybe one of you guys can try to recreate it in a local environment before i create a ticket?
    – VicePrez
    May 4, 2011 at 1:21
  • maybe it has to do with that the proper way to add the Post Formats to a Child Theme of Twenty Ten is to include (and bump up) the priority? More info on this via wpti.ps/?p=95 (see update) or senl.in/m7RjER
    – user2015
    May 4, 2011 at 1:39

1 Answer 1

1

Thanks to @goldenapples and @kaiser for their guidance. Apparently (for some odd reason) i had two terms registered with post-format-video. Im not sure if the following can be a viable solution to the problem, but i fired up Workbench and deleted both rows in the wp_terms table. I then reloaded the local site, created a post under the video post-format, and finally.. its resolved. One "video" post-format was registered both in the post-format meta box and the wp_terms table.

I'll leave the intricacies of why this happened and how this worked to the wise.

Either way. I reported this problem to the wp hackers list.

Thanks guys.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.