Short answer: you can’t do that, that’s not what OpenGraph data is, does, or how it works.
Long answer: OpenGraph applies to the single post pages only, realistically. When you’re putting a like button (for example) onto each post on a archive page, the like button is going to point to the permalink of the single post. That’s where FB will look for the OG data for that particular like, not on the archive/home page.
Best answer: Don’t DIY it. Just install my Simple Facebook Connect plugin, and let it do all the OpenGraph grunt work for you automagically. I just added support for Audio data, and I’m improving the video handling now. SFC 1.2 will have some great functionality there. 🙂
http://wordpress.org/extend/plugins/simple-facebook-connect/
Related Posts:
- facebook like, tweet and google+1 buttons inside the loop on home, archive and search pages and missing facebook like buttons
- Link Button url count php and wordpress
- Adding vkontakte social “like” button to posts results in multiple buttons on first post only
- How to get Author ID outside the loop
- remove tags from the_content
- the_title() shows title of the first post instead of the page title?
- Why do themes rely on “The Loop”?
- How do I prevent one of two multiple loops from repeating on a second page?
- What exactly defines a Main Loop and a Secondary Loop?
- Loop code is displaying pages but not actual posts
- How are both HTTP and HTTPS versions displaying?
- post loop causes wp_users and wp_usermeta DB queries for each users
- Ajax loop refresh on click
- How do you split multiple-column loop on category archive page?
- How to Loop within a Loop (Display Children and then Grandchildren)
- the_excerpt(), get_the_excerpt() and the_content() all killing “the Loop”
- Is get_posts() more efficient than The Loop?
- loop through all posts memory error
- Get titles of all posts with current tags except current post
- Creating a multi-taxonomy query, excluding the newest (read: highest ID) taxonomy term
- Show a different post every 3 days [duplicate]
- Targeting a Certain Post in Loop (CSS)
- Get post/page data outside the loop
- Display most viewed post from last 30 days is not working correctly
- What is the maximum number of posts a WordPress loop can work with?
- wp_query inside the_loop
- Split loop to load WordPress gallery into Bootstrap modal and carousel
- Trouble Formatting DateTime
- Order archive results by post id in custom taxonomy template
- pre_get_posts for two loops on same page
- WordPress Rewriting the DOM?
- Modified loop-single-forum.php to work inside of a sidebar Widget, not working on some site pages
- Basic multiple loops only displaying first loop
- Problem with displaying HTML content after in_array [closed]
- Both a page loop and posts loop on the same page
- Get author_id in wordpress
- Single.php different behaviour from admin to non-admin
- WordPress Blog has an infinite redirect loop
- Stepping through a foreach loop – adding +1 to the end of it so next time it loops it starts on item 2
- Can’t access PHP array inside script localization from javascript
- ACF – add a group inside a repeater [closed]
- How to create bootstrap grid loop?
- Is it possible to reverse the order of a list of posts pulled from a loop?
- Get post offset/posts page offset in single post page (outside the loop)
- First article : single column; Other articles : 2 columns
- How can I access specific posts brought back by query_posts?
- Put multiple custom loops on same page
- Contact information footer
- custom post on homepage
- Multisite foreach loop returning only one result
- Content Visibility for WordPress is not working (Drafts, public etc.)
- Loop is crazy – one row displays wrong count of posts [closed]
- Generating a perfect loop
- I need to display all post in onepage
- WordPress loop not working only on home page, works on all other pages
- Exclude category from get_the_category
- Video post format, extra content breaks video embed
- How to use author’s avatar as Facebook post preview image when a single post is shared
- Why is my category post repeating twice
- Adding a featured image to a foreach WordPress loop
- Hook to main query with filters based on custom fields
- Using has_tag() outside loop
- open graph image being overwritten by gravatar logo?
- WordPress: query pages except remove one page
- get_post_meta printing empty fields, but it shouldn’t be
- Sort posts according to a numeric value entered with ACF
- Is it possible to set archive.php instead of index.php to display blog?
- How to read taxonomy in loop?
- Undefined index: page in loop load ajax content
- how to add 4 post in one carousel slide
- Only Show Excerpt After First 3 Posts
- How to get all multi-select user meta values and add them to an array?
- How to insert content before pagination in loop?
- How to resolve a reload loop issue in the frontend when logged in to WordPress multi-site backend admin area
- Is “the loop” a template tag?
- Excerpt isn’t working or am I missing something?
- Can I temporarily disable global $post?
- Deeply Nested Menu Loop with Twig using Timber [closed]
- WordPress redundant posts based on meta field
- WordPress with woocommerce custom query
- Get featured image outside the loop using foreach
- Infinite Loop after Genesis Theme Upgrade
- Page gets displayed in post field
- pre_get_posts main_query not displaying after applying tax_query filters
- WordPress loop only displays 5 articles max?
- setup_postdata in “loop-handling” php file called via $.ajax
- Secondary loop cuts off at 10 posts?
- Same Loop on Multiple Pages
- get all page templates
- Paged homepage – requirements?
- Least Number of Loops to Create Custom Homepage?
- strange parse error when including a loop template within another template
- Previous Posts Link and Next Posts Link Show All The Same Articles?
- Posts Loops To Display Specific Posts Inside Page Template?
- Use callback function in AJAX pure javascript [closed]
- Force Jetpack to use og:url with http on an https website
- Undefined variable: woocommerce_loop [closed]
- title not being printed within html tag [closed]
- How to get files from loop for zip
- Divide loop into several columns based on post custom field and enable infinite scrolling