Where are wordpress post formats stored within db?

I’m using Fishpig’s magento extension and looking to include the post format as a data element on the Post model, however by default it is not included.

I need to modify the code to also look for this value.

Read More

I’ve taken a look at postmeta and I don’t see any changes when i change the post formats.

Where is the relationship between wp_posts and their format?

Related posts

Leave a Reply

1 comment

  1. The relationship is a pivot between wp_posts -> wp_term_relationships <- wp_terms

    For those interested in accessing post formats this through the fishpig magento wordpress extension you can use this as a starting point:

    within: appcodecommunityFishpigWordpressModelPost.php
    edit the method getPostFormat

    public function getPostFormat()
    {
            return Mage::getResourceModel('wordpress/term_collection')
            ->addTaxonomyFilter('post_format')
            ->addPostIdFilter($this->getId())
            ->getFirstItem()
            ->getData('name');
    }
    

    and then you can call from within your post list/view template:

    echo $post->getPostFormat()
    and do something with it