WordPress.org

Plugin Directory

jetpack

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#1959 closed defect (duplicate)

Open Graph: og:url set improperly with previously static homepages

Reported by: blobaugh Owned by: blobaugh
Priority: normal Severity: normal
Plugin: jetpack Keywords: facebook sharedaddy open-graph publicize has-patch needs-testing
Cc: migueluy, richardmtl, jeremy+wp@…

Description

og:url is set off of get_option( 'page_for_posts' )

If get_option( 'page_for_posts' ) returns 0 the home url is used, otherwise the id of the page set is used. This is the only check for a static homepage, however it does not work if the site admin changes back to posts for the home page. page_for_posts will still be set, thus causing og:url to show the wrong url.

The fix for this is to first check to see if the static home page option is set with get_option( 'show_on_front' )

Attachments (1)

1959.diff (757 bytes) - added by blobaugh 4 years ago.

Download all attachments as: .zip

Change History (5)

@blobaugh4 years ago

comment:1 @blobaugh4 years ago

Was unable to create og:* tags on test site. Please test patch

comment:2 @jeherve4 years ago

  • Cc jeremy+wp@… added
  • Keywords facebook sharedaddy open-graph publicize has-patch needs-testing added
  • Summary changed from og:url set improperly with previously static homepages to Open Graph: og:url set improperly with previously static homepages

comment:3 @ryancowles4 years ago

  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.