Additions to Step 1 for custom page titles
Great guide! Used it to integrate to Wordpress 3.5.2. In case anyone is interested, I added to step 1 of the guide to inject different page titles for each page. I hate seeing flags in Google Webmaster Tools for duplicate page titles. Here is the modified code. Change titles to whatever you like.
#include added for Wordpress integration
if (!strpos($_SERVER, "/scp/")) {
$_SERVER="/support/"; //replace support with Wordpress page name (needs to match osTicket folder name.)
include(ROOT_DIR.'../wp-blog-header.php');
#assign page title depending on uri (replace support in case statements with osTicket folder name above.)
function assignPageTitle() {
$pageuri = $_SERVER;
switch($pageuri) {
case "/support/open.php":
return "New Ticket";
case "/support/thankyou.php":
return "Thank you";
case "/support/tickets.php":
return "Ticket Status";
case "/support/view.php":
return "View Tickets";
#default title in case of no match
default:
return "Support";
}
}
add_filter('wp_title', 'assignPageTitle');
}