Title: template_redirect
Last modified: May 17, 2018

---

# template_redirect

 *  [Gabor](https://wordpress.org/support/users/nextendweb_gabor/)
 * (@nextendweb_gabor)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/template_redirect/)
 * Hi! I’m Gabor from Nextendweb. We have a plugin, which uses output buffers to
   call in our files and the part where our code would run is closed if your plugin
   is installed too. Our senior developer took a look at your code and what he would
   suggest is, that in this file:
    seo-wordpress\seo-rewritetitle-class.php where
   currently you have this function:
 *     ```
       function zeo_final_title(){
           // Use object to avoid namespace collisions
         $zeo_rewrite_title = new zeo_rewrite_title();
   
         // We want to act when the page is 99% complete
         add_action('wp_footer', array(&$zeo_rewrite_title, 'wpzeo_footer'));
   
         // There is no action hook for "start of processing",
         // so we use this implicitly.
         $zeo_rewrite_title->starting();
       }
       ```
   
 * that could be changed to this:
 *     ```
       function zeo_final_title(){
         $zeo_rewrite_title = new zeo_rewrite_title();
         $priority = 10;
         add_action('template_redirect', array($zeo_rewrite_title, 'starting'), $priority);
         add_action('shutdown', array(&$zeo_rewrite_title, 'wpzeo_footer'), -1 * $priority);
       }
       ```
   
 * and because of the priority this way our code would be able to run too. Would
   you be willing to modify this part of your code?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Mervin Praison](https://wordpress.org/support/users/mervinpraison/)
 * (@mervinpraison)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/template_redirect/#post-10558875)
 * Thanks Gabor for your valuable suggestion. I will get this added on to the next
   release.
 * Thanks

Viewing 1 replies (of 1 total)

 The topic ‘template_redirect’ is closed to new replies.

 * ![](https://ps.w.org/seo-wordpress/assets/icon.svg?rev=1802529)
 * [AISEO](https://wordpress.org/plugins/seo-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/seo-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/seo-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/seo-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/seo-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/seo-wordpress/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mervin Praison](https://wordpress.org/support/users/mervinpraison/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/template_redirect/#post-10558875)
 * Status: not resolved