BakerMan

Title post id 9999 fix (TEC 3.0)

Jul 5th, 2013
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. /**
  2.  * Fix for iFeature / CyberChimps themes where a bogus URL like
  3.  * example.com/?post_id=9999 is being displayed above event pages
  4.  * (normally when Default Page Template has been selected).
  5.  *
  6.  * Do not add this to the main theme (in the case of iFeature) but
  7.  * place it within your child theme's functions.php file.
  8.  */
  9. add_filter('the_title', 'event_title_fix', 100);
  10.  
  11. function event_title_fix($title) {
  12.     if (empty($title) && tribe_is_event_query()) return ' ';
  13.     return $title;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment