Skip to content
GravityKit
Buy
Sign in
0 items
  • Plugins

    GravityKit All Access

    Our complete Kit of essential tools for extending and enhancing Gravity Formsโ€”everything you need to build powerful web apps and workflows.

    Learn more
    • GravityView

      GravityView

      Bestseller

      Display Gravity Forms entries on the front-end of your site and build powerful web applications.

    • GravityImport

      GravityImport

      Trending

      Import entries from CSV files into Gravity Forms to transfer data, create new forms, or update existing entries.

    • GravityEdit

      GravityEdit

      Quickly edit Gravity Forms entries inline to save time, reduce clicks, and streamline your workflow.

    • GravityCharts

      GravityCharts

      Trending

      Turn Gravity Forms entries into interactive charts and graphs.

    • GravityActions

      GravityActions

      Update multiple Gravity Forms entries at once, send bulk emails, and streamline your workflow.

    • GravityCalendar

      GravityCalendar

      Turn Gravity Forms entries into dynamic calendars to showcase events, schedules, appointments, and more.

    • GravityExport

      GravityExport

      Export Gravity Forms entries to Excel, CSV, or PDF and share them instantly with secure download links.

    • GravityMath

      GravityMath

      Perform advanced calculations on Gravity Forms entries to display totals, averages, or build custom calculators.

    • GravityRevisions

      GravityRevisions

      Track, compare, and restore changes made to Gravity Forms forms and entries with a full version history.

    • GravityMigrate

      GravityMigrate

      Migrate all Gravity Forms data, including forms, entries, Views, feeds, uploads, and more.

    • GravityBoard

      GravityBoard

      Manage projects with collaborative project management. Coordinate with your team and streamline your workflows.

  • Ideal For

    • Nonprofits
    • Startups
    • Education
    • Web Agencies
    • Developers
    • Government iconGovernment
    Explore All Use Cases

    Case studies

    • West Fork Schools
    • Princeton University
    • BrightLeaf Giving
    • Jacksonville Port Authority
    • National Severe Storms Lab
    • Leadpal
    • Mediebruket
    • Dragonfly
    View All Case Studies
  • Resources

    • Blog
    • Case studies
    • Support
    • Live Demos
    • Documentation
    • Developer docs
    • GravityKit Academy
    • GravityKit Live!

    Ultimate guides

    • How to use Gravity Forms
    • Editing Gravity Forms entries
    • Importing Gravity Forms entries
    • Exporting Gravity Forms entries
    • Displaying Gravity Forms entries
    • Gravity Forms conditional logic
    • Gravity Forms calculations
    View More Articles
  • Plugins

    • GravityView

      GravityView

      Bestseller

      Display Gravity Forms entries on the front-end of your site and build powerful web applications.

    • GravityImport

      GravityImport

      Trending

      Import entries from CSV files into Gravity Forms to transfer data, create new forms, or update existing entries.

    • GravityEdit

      GravityEdit

      Quickly edit Gravity Forms entries inline to save time, reduce clicks, and streamline your workflow.

    • GravityCharts

      GravityCharts

      Trending

      Turn Gravity Forms entries into interactive charts and graphs.

    • GravityActions

      GravityActions

      Update multiple Gravity Forms entries at once, send bulk emails, and streamline your workflow.

    • GravityCalendar

      GravityCalendar

      Turn Gravity Forms entries into dynamic calendars to showcase events, schedules, appointments, and more.

    • GravityExport

      GravityExport

      Export Gravity Forms entries to Excel, CSV, or PDF and share them instantly with secure download links.

    • GravityMath

      GravityMath

      Perform advanced calculations on Gravity Forms entries to display totals, averages, or build custom calculators.

    • GravityRevisions

      GravityRevisions

      Track, compare, and restore changes made to Gravity Forms forms and entries with a full version history.

    • GravityMigrate

      GravityMigrate

      Migrate all Gravity Forms data, including forms, entries, Views, feeds, uploads, and more.

    • GravityBoard

      GravityBoard

      Manage projects with collaborative project management. Coordinate with your team and streamline your workflows.

    GravityKit All Access

    Our complete Kit of essential tools for extending and enhancing Gravity Formsโ€”everything you need to build powerful web apps and workflows.

    Learn more
  • Ideal For

    • Nonprofits
    • Startups
    • Education
    • Web Agencies
    • Developers
    • Government iconGovernment
    Explore All Use Cases

    Case studies

    • West Fork Schools
    • Princeton University
    • BrightLeaf Giving
    • Jacksonville Port Authority
    • National Severe Storms Lab
    • Leadpal
    • Mediebruket
    • Dragonfly
    View All Case Studies

    How to build...

    • Property Management
    • Product Catalog
    • Fundraising Dashboard
    • Real Estate Directory
    • Document Library
    • Academic Journal
    • Volunteer Management
    • Meal Tracker
    View All Guides
  • Resources

    • Blog
    • Case studies
    • Support
    • Live Demos
    • Documentation
    • Developer docs
    • GravityKit Academy
    • GravityKit Live!

    ultimate guides

    • How to use Gravity Forms
    • Editing Gravity Forms entries
    • Importing Gravity Forms entries
    • Exporting Gravity Forms entries
    • Displaying Gravity Forms entries
    • Gravity Forms conditional logic
    • Gravity Forms calculations
    View More Articles
  • Pricing
  • About
0 items
Results appear automatically as you type.
Loading results…

results found matching

    Sign in
    Buy

    Docs

    • Docs Home

    Gravity Forms Add-Ons

    • GravityView
    • GravityActions
    • GravityBoard
    • GravityCalendar
    • GravityCharts
    • GravityEdit
    • GravityExport
    • GravityImport
    • GravityMath
    • GravityMigrate
    • GravityRevisions
    • GF Widget for Elementor
    • GF Dynamic Lookup
    • GF Entry Tags
    • GF Event Field
    • GF Zero Spam
    • GravityExport Lite

    GravityView

    • Getting Started
    • View Setup
    • FAQ
    • Pre-Sale
    • Advanced
    • Common Problems
    • Customizing Your Views
    • Edit Entry
    • Entry Approval
    • Filter and Sort Results
    • Gravity Forms
    • Merge Tags
    • Roles and Capabilities
    • Search
    • Shortcodes
    • View Settings
    • WordPress Posts

    General Help

    • Account, Invoices, and Billing
    • License Related
    • Plugins and Settings
    • Contact
    • Docs Home
    • Gravity Forms Add-Ons

      • GravityView
      • GravityActions
      • GravityBoard
      • GravityCalendar
      • GravityCharts
      • GravityEdit
      • GravityExport
      • GravityImport
      • GravityMath
      • GravityMigrate
      • GravityRevisions
      • GF Widget for Elementor
      • GF Dynamic Lookup
      • GF Entry Tags
      • GF Event Field
      • GF Zero Spam
      • GravityExport Lite
    • GravityView

      • Getting Started
      • View Setup
      • FAQ
      • Pre-Sale
      • Advanced
      • Common Problems
      • Customizing Your Views
      • Edit Entry
      • Entry Approval
      • Filter and Sort Results
      • Gravity Forms
      • Merge Tags
      • Roles and Capabilities
      • Search
      • Shortcodes
      • View Settings
      • WordPress Posts
    • General Help

      • Account, Invoices, and Billing
      • License Related
      • Plugins and Settings
    • Contact

    GravityView Pro

      • (Advanced) What changed from 1.x to 2.0?
      • Field Conditional Logic
      • Field Conditional Logic doesn’t hide empty fields
      • Filtered results are not showing
      • Filtering a View using the Assignee field from Gravity Flow
      • Filtering by entry approval status
      • Filtering by the week of the year
      • Filtering by user role
      • Getting Started With the Advanced Filtering Extension
      • How to show only entries created by the currently logged-in user
      • How to show only entries from the current day, week, month, or year
      • I can’t type in a relative date
      • The :disabled_admin Merge Tag Modifier
      • Using Advanced Filtering with Multiple Forms
      • Why can’t I see the Fields dropdown?
      • Change the search parameter from “letter” to something else
      • Configuring the A-Z Filters Widget
      • The “Use this field to filter entries” setting
      • Dashboard Views: Deciding which fields to display
      • Dashboard Views: Display the View title
      • Dashboard Views: How to modify the menu icon
      • Dashboard Views: The included CSS Frameworks
      • Getting started with Dashboard Views
      • Buttons (DataTables Setting)
      • Changing the style of the export buttons in DataTables
      • Customizing DataTables Options in GravityView
      • DataTables Data Processing Mode (AJAX or Preloaded)
      • DataTables Excel Export – How to display URLs
      • DataTables Excel Export – How to remove HTML tags from the export
      • DataTables Field Filters
      • DataTables PDF Export – How to display images
      • DataTables PDF Export – How to display links
      • DataTables PDF Export – How to include a company logo
      • DataTables Print – How to display images and URLs
      • DataTables Setting: Save Table State
      • DataTables Views can’t be displayed using echo do_shortcode functions
      • DataTables: is it possible to exclude fields from printing?
      • Enable Auto-Update (DataTables Setting)
      • Getting Started With the DataTables Layout
      • Grouping rows by common field values
      • How to customize the “Loading data” text
      • How to customize the “No matching records found” text
      • How to customize the CSV field separator?
      • How to customize the Excel export file name
      • How to disable the “Loading data” message
      • How to disable the DataTables search box
      • How to Enable the Responsive Tables mode
      • How to translate the DataTables script
      • Is there a way to style the PDF on DataTables?
      • Known limitations of the Responsive Tables mode of DataTables
      • Multi-sorting columns in DataTables
      • My column widths aren’t being respected when using Responsive Tables
      • My DataTables View is not sorting properly
      • Removing the striped background from DataTables
      • Responsive (DataTables Setting)
      • Scroller (DataTables Setting)
      • The text inside a column is going out of the screen
      • Why doesn’t my DataTables sort correctly?
      • DIY Layout: Remove the “Go back” link
      • DIY Version 2.2 changes to HTML output
      • Getting Started With the DIY Layout
      • How do I add additional container tag default options?
      • Showing Before and After Content even when field is empty
      • Getting started with the Advanced Elementor Widget for GravityView
      • Understanding the “Show Debug Output” option
      • Getting Started With the Featured Entries Extension
      • How do I change the design of a Featured entry?
      • How to always display featured entries, regardless of search results
      • How to feature an entry using PHP
      • How to visually highlight featured entries in the Recent Entries widget
      • Show only Featured Entries in the Recent Entries widget
      • Allowing users to delete entries when using a Magic Link
      • Fields not appearing in Edit Entry when using Magic Links?
      • Getting Started with Magic Links
      • Magic Links Filters
      • Preserving Magic Links parameters on password-protected Views
      • The {gv_magic_links} Merge Tag
      • About custom map icons or markers
      • About GravityView Maps geocoding
      • Adding your Google Maps API Key into Divi
      • Adding your Google Maps API Key into Premium Addons for Elementor
      • Adding your Google Maps API Key into Ultimate Addons for Elementor
      • Associating a custom map pin icon (marker) with a field value
      • Can I use Maps to autocomplete addresses on my form?
      • Configuring info boxes in GravityView Maps
      • Enabling autocomplete for the Gravity Forms Address field
      • Enabling the REST API access
      • Error: Google Maps API warning: NoApiKeys
      • Error: This page can’t load Google Maps correctly
      • Filter the address field: gravityview/maps/marker/address
      • Fixing a conflict with UberMenu plugin
      • Getting Started With the Maps Layout
      • Google Maps Javascript API Error “RefererNotAllowedMapError”
      • Granting Google Cloud Access to Support
      • How can I make the marker link to open in a new tab?
      • How can I pull the address from a field type that is not Address?
      • How do I display only the Map? I don’t want to display the entries under the Map.
      • How to enable and configure map marker clustering
      • How to enable radius search
      • How to hide map elements using CSS
      • How to override geocoding coordinates
      • How to show markers from multiple address fields on a map
      • Is it possible to style the map?
      • My map is gray and there are no entry markers
      • Radius Search: Request Location
      • Set Up Google Maps in GravityView Maps
      • Support for OpenStreetMap or other map providers
      • Using a latitude and longitude fields to position the map markers
      • What are “Search as map moves” and “Redo search in map”?
      • Why aren’t some of my entries showing up on the map?
      • Getting Started With Multiple Forms
      • How to connect two forms using the Nested Forms field with the Multiple Forms
      • I don’t see the option to join multiple forms
      • Known limitations of Multiple Forms
      • Multiple Forms: How the “Strict Entry Match” setting works
      • Multiple Forms: Searching entries
      • Multiple Forms: Unions are not supported
      • Using Advanced Filtering with Multiple Forms
      • Why I’m seeing duplicated records on my View?
      • [Advanced] How to modify Ratings & Reviews entry comment titles
      • Creating a review/voting system by embedding a form into a single entry (short)
      • How to change the description of the Star Rating titles on hover
      • How to disable email notifications for reviews
      • How to Setup the Ratings & Reviews Extension
      • Issue: GravityView Single Entry page only shows โ€œLeave a Reply”
      • Ratings & Reviews Anonymous Reviews
      • Ratings & Reviews Hooks
      • Ratings & Reviews Merge Tags
      • Getting Started With the Social Sharing & SEO Extension
      • How to fix Open Graph meta tags for single entry pages when using the WordPress SEO plugin
      • Setting up SEO for Views with Yoast SEO
      • Setting up sharing buttons with JetPack
      • Getting started with PDF for GravityView
    • Home
    • Docs
    • GravityView Pro
    • Social Sharing & SEO
    • How to fix Open Graph meta tags for single entry pages when using the WordPress SEO plugin

    How to fix Open Graph meta tags for single entry pages when using the WordPress SEO plugin

    Estimated reading: 11 minutes

    Updated on April 24, 2026

    This article is deprecated: this functionality exists in Social Sharing & SEO extension.

    This article is meant to help you fix the Open Graph metatags of the Single Entry screen when using the WordPress SEO plugin by Yoast. This will help you get better behavior when sharing your single-entry view content on social networks, especially on Facebook.

    By default, WordPress SEO plugin will output the following on the head section of aย single entry view page:

    
    <!-- This site is optimized with the Yoast WordPress SEO plugin v1.7.1 - https://yoast.com/wordpress/plugins/seo/ -->
    <meta name="description" content="My WordPress SEO meta description"/>
    <link rel="canonical" href="http://example.com/view/my-demo-issue-tracker/" />
    <meta property="og:locale" content="en_US" />
    <meta property="og:type" content="article" />
    <meta property="og:title" content="My demo issue tracker view" />
    <meta property="og:description" content="My WordPress SEO meta description" />
    <meta property="og:url" content="http://example.com/view/my-demo-issue-tracker/" />
    <meta property="og:site_name" content="Sandbox" />
    <!-- / Yoast WordPress SEO plugin. -->

    Fix the canonical link #

    As shown in the example above, we want to transform the default canonical link

    <link rel="canonical" href="http://example.com/view/my-demo-issue-tracker/" />ย 

    in the link to the current single-entry view and not to the multiple entries view.ย To accomplish it, please paste the following code in your theme’s functions.php:

    
    # For all Yoast versions
    add_filter( 'wpseo_canonical', 'my_gv_yoast_canonical_url' );
    
    function my_gv_yoast_canonical_url( $canonical_url ) {
        return ( function_exists( 'gravityview_is_single_entry' ) && gravityview_is_single_entry() ) ? 
            add_query_arg( array() ) : 
            $canonical_url;
    };

    The new link will look like this: <link rel="canonical" href="http://example.com/view/my-demo-issue-tracker/entry/1384/" />

    Fix the og:titleย andย titleย  #

    To make sure the opengraph title tag is specific for your single entry view, please add the following code to your theme’s functions.php, making sure to customize the code for your FORM ID and choosing the right form field (FIELD ID) to be used as input for the title.

    
    # For Yoast v13 and below
    add_filter( 'wpseo_title', 'my_gv_yoast_title_and_opengraph_title', 10, 1 );
    
    # For Yoast v14 and above
    add_filter( 'wpseo_title', 'my_gv_yoast_title_and_opengraph_title', 10, 1 );
    add_filter( 'wpseo_opengraph_title', 'my_gv_yoast_title_and_opengraph_title', 10, 1 );
    
    function my_gv_yoast_title_and_opengraph_title( $title ) {
        if ( ! function_exists( 'gravityview_is_single_entry' ) || ! function_exists( 'gravityview_get_entry' ) ) {
            return $title;
        }
    
        // Get single Entry id
        $entry_id = gravityview_is_single_entry();
        if ( empty( $entry_id ) ) {
            return $title;
        }
    
        // Get Entry
        $entry = gravityview_get_entry( $entry_id, true );
        if (! $entry ) {
            return $title;
        }
    
        $form_id = empty( $entry['form_id'] ) ? '' : $entry['form_id'];
        $title_field = null;
    
        switch ( $form_id ) {
            // Your form ID
            case '1':
                // Title field ID
                $title_field = '2';
                break;
        }
    
        return ( $title_field && ! empty( $entry[ $title_field ] ) ) ? 
            $entry[ $title_field ] : 
            $title;
    };

    After applying this code, you should expect a different og:title meta: <meta property="og:title" content="Sit amet turpis elementum ligula vehicula" />

    Fix the og:description and description #

    If you would like to make sure the description meta tag is also customized according to the entry information, place the following code into your theme’s functions.php, making sure to adapt it to your FORM ID and selecting the FIELD ID that will populate the meta values.

    
    # For Yoast v13 and below
    add_filter( 'wpseo_metadesc', 'my_gv_yoast_meta_and_opengraph_description', 10, 1 );
    
    # For Yoast v14 and above
    add_filter( 'wpseo_metadesc', 'my_gv_yoast_meta_and_opengraph_description', 10, 1 );
    add_filter( 'wpseo_opengraph_desc', 'my_gv_yoast_meta_and_opengraph_description', 10, 1 );
    
    function my_gv_yoast_meta_and_opengraph_description( $desc ) {
        if ( ! function_exists( 'gravityview_is_single_entry' ) || ! function_exists( 'gravityview_get_entry' ) ) {
            return $desc;
        }
    
        // Get single Entry id
        $entry_id = gravityview_is_single_entry();
        if ( empty( $entry_id ) ) {
            return $desc;
        }
    
        // Get Entry
        $entry = gravityview_get_entry( $entry_id, true );
        if (! $entry ) {
            return $desc;
        }
    
        $form_id = empty( $entry['form_id'] ) ? '' : $entry['form_id'];
        $desc_field = null;
    
        switch ( $form_id ) {
            // Your form ID
            case '1':
                // Description field ID
                $desc_field = '2';
                break;
        }
    
        return ( $desc_field && ! empty( $entry[ $desc_field ] ) ) ? 
            $entry[ $desc_field ] : 
            $desc;
    };

    This code will affect the following lines:

    
    <meta name="description" content="sit amet turpis elementum ligula vehicula consequat morbi a ipsum integer a nibh in quis justo maecenas"/>
    <meta property="og:description" content="sit amet turpis elementum ligula vehicula consequat morbi a ipsum integer a nibh in quis justo maecenas" />

    Fix the og:image #

    To make sure WordPress SEO picks the image according to the displayed entry, paste the following code into your theme’s functions.php, making sure to address the correct FORM ID and FIELD ID.

    
    # For Yoast v13 and below
    add_action( 'wpseo_opengraph', 'my_gv_yoast_v13_opengraph_image', 10, 1);
    
    function my_gv_yoast_v13_opengraph_image( $img ) {
        if ( ! function_exists( 'gravityview_is_single_entry' ) || ! function_exists( 'gravityview_get_entry' ) ) {
            return $img;
        }
    
        // Get single Entry ID
        $entry_id = gravityview_is_single_entry();
        if ( empty( $entry_id ) ) {
            return $img;
        }
    
        // Get Entry
        $entry = gravityview_get_entry( $entry_id, true );
        if (! $entry ) {
            return $img;
        }
    
        $form_id = empty( $entry['form_id'] ) ? '' : $entry['form_id'];
        $img_field = null;
    
        switch ( $form_id ) {
           // Your form ID
            case '1':
                // Image field ID
                $img_field = '2';
                break;
        }
    
        $img = ( $img_field && ! empty( $entry[ $img_field ] ) ) ? $entry[ $img_field ] : $img;
    
        $opengraph_image = new WPSEO_OpenGraph_Image( $image, $GLOBALS['wpseo_og'] );
        $opengraph_image->add_image( $img );
        $opengraph_image->show();
    };
    
    # For Yoast v14 and above
    add_filter( 'wpseo_opengraph_image', 'my_gv_yoast_v14_opengraph_image', 10, 1 );
    
    function my_gv_yoast_v14_opengraph_image( $img ) {
        if ( ! function_exists( 'gravityview_is_single_entry' ) || ! function_exists( 'gravityview_get_entry' ) ) {
            return $img;
        }
    
        // Get single Entry ID
        $entry_id = gravityview_is_single_entry();
        if ( empty( $entry_id ) ) {
            return $img;
        }
    
        // Get Entry
        $entry = gravityview_get_entry( $entry_id, true );
        if (! $entry ) {
            return $img;
        }
    
        $form_id = empty( $entry['form_id'] ) ? '' : $entry['form_id'];
        $img_field = null;
    
        switch ( $form_id ) {
           // Your form ID
            case '1':
                // Image field ID
                $img_field = '2';
                break;
        }
    
        return ( $img_field && ! empty( $entry[ $img_field ] ) ) ? 
            $entry[ $img_field ] : 
            $img;
    };

    You should get a proper image meta tag as follows: <meta property="og:image" content="https://example.com/131357700_9b7f1079d4.jpg" />

    Read more about theย  WordPress SEO plugin available hooks.

    Still stuck? How can we help?

    How can we help?

    "*" indicates required fields

    This field is for validation purposes and should be left unchanged.
    Replies will go to this email.
    How can we help?*
    My pre-sale question is related to...*
    My WordPress skills are....*
    My Gravity Forms skills are...*
    You will be shown articles from our documentation.
    Vous pouvez nous รฉcrire dans votre langue maternelle si cโ€™est plus facile pour vousโ€”nous nous occuperons de la traduction!
    Puedes escribirnos en tu idioma nativo si te resulta mรกs fรกcil; ยกnosotros nos encargamos de la traducciรณn!
    Sie kรถnnen uns in Ihrer Muttersprache schreiben, wenn das fรผr Sie einfacher ist โ€“ wir kรผmmern uns um die รœbersetzung!
    U kunt ons in uw moedertaal schrijven als dat gemakkelijker voor u is โ€” wij zorgen voor de vertaling!
    Du kan skrive til oss pรฅ ditt morsmรฅl hvis det er enklere for deg โ€” vi tar oss av oversettelsen!
    Du kan skriva till oss pรฅ ditt modersmรฅl om det รคr lรคttare fรถr dig โ€” vi tar hand om รถversรคttningen!
    Vocรช pode nos escrever em seu idioma nativo se for mais fรกcil para vocรช โ€” nรณs cuidaremos da traduรงรฃo!
    Puoi scriverci nella tua lingua madre se ti รจ piรน facile โ€” penseremo noi alla traduzione!
    Please provide as much detail as you're able; this helps us provide you with faster support.
    Drop files here or
    Accepted file types: jpg, jpeg, gif, png, tiff, pdf, bmp, zip, json, csv, xls, xlsx, Max. file size: 256 MB.
      Stay informed?

      Was this page helpful?

      Table Of Contents
      • Fix the canonical link
      • Fix the og:titleย andย titleย 
      • Fix the og:description and description
      • Fix the og:image
      GravityKit
      • How to Build It
      • Pricing
      • Products
      • Our Team
      • Our Values
      • Work With Us
      • Coupons
      Support
      • Support
      • Contact
      • Documentation
      • Scope of Support
      • Brand Guidelines
      • Privacy Policy
      • Terms of Service (โ€œTermsโ€)
      About Us
      • GravityKit on Mastodon
      • GravityKit on Twitter
      • GravityKit Training Courses
      • GravityKit on Facebook
      • Join our Facebook Group
      • Facebook
      • Twitter
      Get notified of updates.

      Weโ€™re constantly improving GravityKit. Fill out your email below and weโ€™ll notify you anytime major updates drop.

      GravityKit is a Gravity Forms Certified Developer.

      Copyright ยฉ 2026, Katz Web Services, Inc.

      GravityKit and GravityView are registered trademarks of Katz Web Services, Inc.