Title: function to return only title without subtitle
Last modified: August 31, 2016

---

# function to return only title without subtitle

 *  Resolved [Dan Butcher](https://wordpress.org/support/users/danbutcher/)
 * (@danbutcher)
 * [10 years ago](https://wordpress.org/support/topic/function-to-return-only-title-without-subtitle/)
 * My theme was messing up because it was using `get_the_title` in a template to
   return the title as part of a social sharing function. I changed this to `the_title_attribute`
   and now the sharing works, but the social sharing shows both the title and subtitle
   as the title.
 * For sharing on FB, Twitter, etc, I would prefer that only the actual title is
   pulled. What wp function should I use instead of `the_title_attribute` to get
   only the post title?
 * [https://wordpress.org/plugins/subtitles/](https://wordpress.org/plugins/subtitles/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Philip Arthur Moore](https://wordpress.org/support/users/philiparthurmoore/)
 * (@philiparthurmoore)
 * [10 years ago](https://wordpress.org/support/topic/function-to-return-only-title-without-subtitle/#post-7435151)
 * This is a really good question. Let me think about this and get back to you today
   Dan!
 * Cheers,
    Philip
 *  Plugin Author [Philip Arthur Moore](https://wordpress.org/support/users/philiparthurmoore/)
 * (@philiparthurmoore)
 * [10 years ago](https://wordpress.org/support/topic/function-to-return-only-title-without-subtitle/#post-7435414)
 * Sorry for the delay on this Dan. Still mulling it over. I should have an update
   for you soon!
 *  Plugin Author [Philip Arthur Moore](https://wordpress.org/support/users/philiparthurmoore/)
 * (@philiparthurmoore)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/function-to-return-only-title-without-subtitle/#post-7435422)
 * Hi Dan,
 * I just remembered that this came up [a while back](https://github.com/professionalthemes/Subtitles/issues/65).
   Give that a read and if you have anything to add, please comment directly on 
   GitHub and we’ll go from there. Thank you so much for your patience. I had to
   think about this and realized that it had some up before.
 * Cheers,
    Philip

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘function to return only title without subtitle’ is closed to new replies.

 * ![](https://ps.w.org/subtitles/assets/icon-256x256.png?rev=1063614)
 * [Subtitles](https://wordpress.org/plugins/subtitles/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/subtitles/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/subtitles/)
 * [Active Topics](https://wordpress.org/support/plugin/subtitles/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/subtitles/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/subtitles/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Philip Arthur Moore](https://wordpress.org/support/users/philiparthurmoore/)
 * Last activity: [9 years, 12 months ago](https://wordpress.org/support/topic/function-to-return-only-title-without-subtitle/#post-7435422)
 * Status: resolved