We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the function largo_opengraph(), the open graph tag output for pages doesn't match that for single posts:
largo_opengraph()
https://github.com/INN/largo/blob/d167efce9c2cb3f4a2a15a0d95705a24bca8470b/inc/open-graph.php#L33-L51
Because is_single() on a post of type 'page' is false, the open graph tags that are output are instead the fallback ones:
is_single()
false
https://github.com/INN/largo/blob/d167efce9c2cb3f4a2a15a0d95705a24bca8470b/inc/open-graph.php#L59-L82
<meta property="og:title" content="<?php bloginfo( 'name' ); wp_title(); ?>" /> <meta property="og:type" content="article" /> <meta property="og:url" content="<?php echo esc_url( largo_get_current_url() ); ?>"/> <?php // .... } else { $description = get_bloginfo( 'description' ); } if ( $description ) { echo '<meta property="og:description" content="' . strip_tags( esc_html( $description ) ) . '" />'; echo '<meta name="description" content="' . strip_tags( esc_html( $description ) ) . '" />'; }
The text was updated successfully, but these errors were encountered:
Fix: change it to is_singular().
is_singular()
Sorry, something went wrong.
Note the peculiar og:title property in the page's case:
og:title
<meta property="og:title" content="<?php bloginfo( 'name' ); wp_title(); ?>" />
On an interior page like inn.org/?s=, the og:title that is output has the site name twice.
inn.org/?s=
<meta property="og:title" content="Institute for Nonprofit News » Search Results » » Institute for Nonprofit News" />
No branches or pull requests
In the function
largo_opengraph()
, the open graph tag output for pages doesn't match that for single posts:https://github.com/INN/largo/blob/d167efce9c2cb3f4a2a15a0d95705a24bca8470b/inc/open-graph.php#L33-L51
Because
is_single()
on a post of type 'page' isfalse
, the open graph tags that are output are instead the fallback ones:https://github.com/INN/largo/blob/d167efce9c2cb3f4a2a15a0d95705a24bca8470b/inc/open-graph.php#L59-L82
The text was updated successfully, but these errors were encountered: