Answers.Body: <p>As you've discovered, this is not something that the WordPress plugin does by default. You can, however, hook into the 'civicrm_basepage_parsed' action that is fired when (ahem) the basepage has been parsed and roll your own Open Graph tags to be included in the markup via 'wp_head'. The content of the basepage is available via the 'basepage_render()' method of class 'CiviCRM_For_WordPress_Basepage', which can be externally accessed with the following code:</p>
  
  <p><code>$content = civi_wp()-&gt;basepage-&gt;basepage_render();</code></p>
  
  <p>Admittedly, this won't tell you what kind of Civi content is being included in the basepage, but the technique above will allow you to produce something more sensible than what you currently have.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-18T08:42:04.373Z
Answers.LastActivityDate: 2015-06-18T08:42:04.373Z
Answers.UserDisplayName: Christian Wach
Answers.Body: <p>PCP shortcodes are now available for both the info and transaction pages.</p>
  <p><a href="https://lab.civicrm.org/dev/wordpress/-/issues/63" rel="nofollow noreferrer">https://lab.civicrm.org/dev/wordpress/-/issues/63</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-31T00:11:48.747Z
Answers.LastActivityDate: 2021-01-31T00:11:48.747Z
Answers.UserDisplayName: Andy Burns
Answers.Body: <p>There is a CiviCRM native extension available also: <a href="https://civicrm.org/extensions/ogp" rel="nofollow noreferrer">https://civicrm.org/extensions/ogp</a></p>
  <p>I have not tested PCP pages recently, but I've been working on improving various aspects of the extension and will be happy to fix if there are PCP-specific issues.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-30T21:34:30.840Z
Answers.LastActivityDate: 2021-01-30T21:34:30.840Z
Answers.UserDisplayName: bgm
Body: <p>We are using Wordpress 4.2.2 &amp; CiviCRM 4.6.1. We have a couple of fundraising events in which participants have the option of creating a Personal Fundraising Page. </p>
  
  <p>When participants share their PCP URL on Facebook the link preview doesn't share any info from their PCP—Page Title, Description or Photo—and doesn't link to their page, it links to the Base page that has been set for CiviCRM in Wordpress.</p>
  
  <p>Is there a way to add Open Graph tags to each PCP? I did see that Mathieu created a Drupal module that adds Open Graph tags on PCP pages for Facebook a few years back: <a href="https://github.com/mlutfy/civicrmogp" rel="nofollow noreferrer">https://github.com/mlutfy/civicrmogp</a>. Does anyone had any ideas for Wordpress?</p>
  
  <p>I do know that there are plugins for Wordpress that allow you to add Open Graph Meta tag info to your website. These allow you to set that info for individual Pages or Posts, however the PCPs are generated dynamically through CiviCRM using the base Wordpress page that I configured, so setting Open Graph info on that page would cause all the PCPs to share the same info on FB—unless I don't know what I talking about (which is totally possible).</p>
  
  <p>Here are some screenshots to help show what I am talking about:
  <img src="https://i.sstatic.net/veiLi.gif" alt="This is what the link preview looks like when posted to Facebook"></p>
  
  <p><img src="https://i.sstatic.net/H9CEQ.gif" alt="This the page that you are taken to when you click on the link preview"></p>
  
Tags: <civicontribute><pcp><personal-campaign-pages><facebook><social-media>
Title: How do I get PCPs to look 'right' when shared on Facebook?
ThreadText: # How do I get PCPs to look 'right' when shared on Facebook?
  
  (Asked by: username_0 on 2015-06-17)
  
  We are using Wordpress 4.2.2 & CiviCRM 4.6.1. We have a couple of fundraising events in which participants have the option of creating a Personal Fundraising Page.
  
  When participants share their PCP URL on Facebook the link preview doesn't share any info from their PCP—Page Title, Description or Photo—and doesn't link to their page, it links to the Base page that has been set for CiviCRM in Wordpress.
  
  Is there a way to add Open Graph tags to each PCP? I did see that Mathieu created a Drupal module that adds Open Graph tags on PCP pages for Facebook a few years back: <https://github.com/mlutfy/civicrmogp>. Does anyone had any ideas for Wordpress?
  
  I do know that there are plugins for Wordpress that allow you to add Open Graph Meta tag info to your website. These allow you to set that info for individual Pages or Posts, however the PCPs are generated dynamically through CiviCRM using the base Wordpress page that I configured, so setting Open Graph info on that page would cause all the PCPs to share the same info on FB—unless I don't know what I talking about (which is totally possible).
  
  Here are some screenshots to help show what I am talking about:
  ![This is what the link preview looks like when posted to Facebook](https://i.sstatic.net/veiLi.gif)
  
  ![This the page that you are taken to when you click on the link preview](https://i.sstatic.net/H9CEQ.gif)
  
  **Tags:** civicontribute, pcp, personal-campaign-pages, facebook, social-media
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2015-06-18. Score: 3
  
  As you've discovered, this is not something that the WordPress plugin does by default. You can, however, hook into the 'civicrm\_basepage\_parsed' action that is fired when (ahem) the basepage has been parsed and roll your own Open Graph tags to be included in the markup via 'wp\_head'. The content of the basepage is available via the 'basepage\_render()' method of class 'CiviCRM\_For\_WordPress\_Basepage', which can be externally accessed with the following code:
  
  `$content = civi_wp()->basepage->basepage_render();`
  
  Admittedly, this won't tell you what kind of Civi content is being included in the basepage, but the technique above will allow you to produce something more sensible than what you currently have.
  
  
  ---
  
  ### Answer by username_2 on 2021-01-31. Score: 1
  
  PCP shortcodes are now available for both the info and transaction pages.
  
  <https://lab.civicrm.org/dev/wordpress/-/issues/63>
  
  
  ---
  
  ### Answer by username_3 on 2021-01-30. Score: 1
  
  There is a CiviCRM native extension available also: <https://civicrm.org/extensions/ogp>
  
  I have not tested PCP pages recently, but I've been working on improving various aspects of the extension and will be happy to fix if there are PCP-specific issues.
  
  
  ---
  
  