Title: Does not work for my theme
Last modified: September 3, 2016

---

# Does not work for my theme

 *  [JHoppe](https://wordpress.org/support/users/jhoppe/)
 * (@jhoppe)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/broken-by-design/)
 * This plugin does not work if the theme calls the_title() / get_the_title(). The
   FAQ says:
 * > “If your theme is incorrectly using the_title(), PrettyPress hooks will automatically
   > be applied here, thus breaking your theme.”
 * I don’t agree with this. Both functions are documented in the wordpress codex
   and absolutely valid to use. They aren’t deprecated at all. Therefore the plugin
   is broken, not my theme.

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

 *  Plugin Author [evasivesoftware](https://wordpress.org/support/users/evasivesoftware/)
 * (@evasivesoftware)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/broken-by-design/#post-8003404)
 * Hi Jhoppe,
 * Prettypress does indeed work for both the_title() and get_the_title(), it does
   _not_ hook the_title_attribute()
 * If you there has a link like so
 * `<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title();?
   ></a>`
 * Then this is unsafe, as the_title() does not escape characters for being wrapped
   in argument. The correct usage would be
 * `<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
   <?php the_title(); ?></a>`
 *  Thread Starter [JHoppe](https://wordpress.org/support/users/jhoppe/)
 * (@jhoppe)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/broken-by-design/#post-8003405)
 * Thanks for replying!
    Indeed. My third-party template has code like this:
 * `<a title="<?php printf(__('Permanent Link to %s', 'framework'), get_the_title());?
   >" href="<?php the_permalink(); ?>">`
 * Isn’t there a workaround? Changing the template on multiple places is not an 
   option here.
 *  Plugin Author [evasivesoftware](https://wordpress.org/support/users/evasivesoftware/)
 * (@evasivesoftware)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/broken-by-design/#post-8003406)
 * Do you have the option to add code to functions.php? If so, try adding
 *     ```
       if ( function_exists('prettypress_thetitle') ) {
       	add_filter( 'get_the_title', 'prettypress_thetitle', 10, 1 );
       }
       ```
   

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

The topic ‘Does not work for my theme’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/prettypress.svg)
 * [PrettyPress](https://wordpress.org/plugins/prettypress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/prettypress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/prettypress/)
 * [Active Topics](https://wordpress.org/support/plugin/prettypress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/prettypress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/prettypress/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [evasivesoftware](https://wordpress.org/support/users/evasivesoftware/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/broken-by-design/#post-8003406)