Title: Shortcode in Title
Last modified: September 21, 2018

---

# Shortcode in Title

 *  Resolved [narayan.changder](https://wordpress.org/support/users/narayanchangder/)
 * (@narayanchangder)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/shortcode-in-title/)
 * All in one seo pack is great. On my website, I want to run short-code in auto-
   generated description (it is working well) as well as in title( trim the length
   of title from text generated from short-code). Is there any way to achieve this
   functionality?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fshortcode-in-title%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Michael Torbert](https://wordpress.org/support/users/hallsofmontezuma/)
 * (@hallsofmontezuma)
 * WordPress Virtuoso
 * [7 years, 8 months ago](https://wordpress.org/support/topic/shortcode-in-title/#post-10711619)
 * We have an issue open for this here: [https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/1867](https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/1867)
 *  Thread Starter [narayan.changder](https://wordpress.org/support/users/narayanchangder/)
 * (@narayanchangder)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/shortcode-in-title/#post-10713892)
 * Thanks. I will wait for this functionality.
 *  Thread Starter [narayan.changder](https://wordpress.org/support/users/narayanchangder/)
 * (@narayanchangder)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/shortcode-in-title/#post-10730396)
 * Hi Torbert. I am facing some problem. I see when the plugin generates auto description
   from content using do_shortcode(), its working. So, I tried to use the do_shortcode()
   function in plugin’s wp_title() function but its not working. Could you please
   tell me how can I achieve this?
 *  /*** Used to filter wp_title(), get our title. ***/
    function wp_title() { global
   $aioseop_options; $title = false; $post = $this->get_queried_object(); if ( !
   empty( $aioseop_options[‘aiosp_rewrite_titles’] ) ) { $title = $this->get_aioseop_title(
   $post ); $title = $this->apply_cf_fields( $title ); }
 *  if ( false === $title ) {
    $title = $this->get_original_title(); }
 *  $content = $post->post_content;
    $title=do_shortcode($content);
 *  return apply_filters( ‘aioseop_title’, $title );
    }

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

The topic ‘Shortcode in Title’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-seo-pack/assets/icon.svg?rev=2443290)
 * [All in One SEO – Powerful SEO Plugin to Boost SEO Rankings & Increase Traffic](https://wordpress.org/plugins/all-in-one-seo-pack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-seo-pack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-seo-pack/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-seo-pack/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [narayan.changder](https://wordpress.org/support/users/narayanchangder/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/shortcode-in-title/#post-10730396)
 * Status: resolved