WordPress.org

Forums

WPBook
Ability to set post title on Facebook? (7 posts)

  1. stevenmusumeche
    Member
    Posted 4 years ago #

    Is there a way to set a different title to be used on Facebook than the WP post title? I'd like to be able to include a call to action ("click the like button") or some other text in the title that gets sent to Facebook which is not in the title from WP. Is this possible? If not, would you consider adding it?

  2. John Eckman
    Member
    Plugin Author

    Posted 4 years ago #

    It is not possible in the current version.

    I would consider it in the future but there are other requirements we should address first (categories, post types, authors).

  3. stevenmusumeche
    Member
    Posted 4 years ago #

    I'm a developer and would be willing to add it myself if you could point me in the right direction.

  4. John Eckman
    Member
    Plugin Author

    Posted 4 years ago #

    Well, you'd need to set up an option first - "enable different post title in Facebook" or something like that.

    Then you'd need to add a custom metadata field to the post edit screen for that field

    Then you'd need to edit the publish_to_facebook.php function to look for that field (if the option is set) and use it (if the field is non-empty)

    Would it also show the different title when you view the app canvas page, or tab? Or only when posting the excerpt to the FB wall?

    Not a simple effort I'm afraid, but have a go.

  5. BandonRandon
    Member
    Plugin Contributor

    Posted 4 years ago #

    Interesting idea Steve, let us know what you come up with.

  6. stevenmusumeche
    Member
    Posted 4 years ago #

    I've never worked on a WordPress plugin before, so I'm a little lost. Where does the code that controls what appears on the post edit page come from? Basically, can you give me an overview of where each part of the code resides?

  7. BandonRandon
    Member
    Plugin Contributor

    Posted 4 years ago #

    See WPBook.php is the guts of the plugin. This is where you'll set the option in the backend (WPBook page view). To edit what's on the post edit page see lines 1088-1113 Which is an example of how the "publish to facebook" function works. We then call the filter on line 1364

    includes/publish_to_facebook.php will control what is sent to facebook. Line 88 sets the title

    Hope that helps

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WPBook
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags