Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#35067 closed enhancement (maybelater)

Embed support for Recent Posts / Static Pages / Archive Pages

Reported by: qrokes's profile QROkes Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: Embeds Keywords:
Focuses: Cc:

Description

I think embedding should be supported for front pages even when is showing "recent posts", there is no reason to exclude this kind of pages (we never know when while writing a post we need to make a reference (embed) to some of this pages).
Also, there are situations when you make a widgetized home page and by default you have to leave the "Settings > Reading > Front Page > Your latest posts" as default and in fact this page is showing the widgetized content instead of the recent posts list.
Nowadays, discovery links are not inserted in "recent posts" pages, but on the other hand these links are inserted for static front pages, although it doesn't work.

wp_oembed_add_discovery_links function now is limited for "is_singular()" condition. is_singular() || is_front_page() || is_home() || is_archive() could be more convenient. There is no negative impact by extending this functionality.

Change History (4)

#1 @SergeyBiryukov
9 years ago

Nowadays, discovery links are not inserted in "recent posts" pages, but on the other hand these links are inserted for static front pages, although it doesn't work.

Related: #34971

#2 @swissspidy
9 years ago

I think embedding should be supported for front pages even when is showing "recent posts", there is no reason to exclude this kind of pages (we never know when while writing a post we need to make a reference (embed) to some of this pages).
Also, there are situations when you make a widgetized home page and by default you have to leave the "Settings > Reading > Front Page > Your latest posts" as default and in fact this page is showing the widgetized content instead of the recent posts list.

oEmbed is designed for single objects like photos, videos, tweets, etc. and not a website's search results page.

Embedding a static front page is easy because we have all the post data we need, but you don't have that for archives. When you have a widgetized front page showing your latest posts, how would that look like when embedding it? How would embedding an archive page look like in general?

#3 @QROkes
9 years ago

You can get enough data to embedding from almost every single site, opengraph for instance, I know this is a very different approach since WP handle it in a very different way, but this could be an option to enhance it.
A more appropriate approach to the recent posts pages example would be showing an embed just with information that is currently available, just as facebook does. You could check if this page have a meta description and then use it as a fallback, for instance.
At the end, I think that the idea is to have a WP embed system that is able to display every single site/page/post constructed under WP. It may sound like an ambitious plan, but would be great and it would benefit a lot of sites and users.

#4 @swissspidy
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed

You can get enough data to embedding from almost every single site, opengraph for instance.

You could check if this page have a meta description and then use it as a fallback, for instance.

oEmbed for archives isn't currently feasible possible mainly because of the lack of content that could be shown in this embed (as mentioned before). The embedded site doesn't have any idea about Open Graph tags or meta tags on the current page.

Link previews using Open Graph have previously been suggested in #32955, but that doesn't have much to do with oEmbed anyway.

I would currently consider both things to be plugin territory.

Note: See TracTickets for help on using tickets.