Skip to content

Instantly share code, notes, and snippets.

@skorasaurus
Last active August 22, 2017 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skorasaurus/d2ea1ad0b0b0de75e7635ed57d0074b3 to your computer and use it in GitHub Desktop.
Save skorasaurus/d2ea1ad0b0b0de75e7635ed57d0074b3 to your computer and use it in GitHub Desktop.
<?php
session_start();
include '../../../privatefilepathwith_sensitiveinfo
if (!isset($_SESSION['start']) || $_SESSION['start'] === 0) {
initSession();
}
if (!validateSession()) {
initSession();
}
ini_set('display_errors', 'On');
error_reporting(E_ALL | E_STRICT);
echo getcwd() . "\n";
require('../wp-blog-header.php');
get_header();
add_filter( 'wp_title', 'mycustom_title', 4);
// DIDNT work - https://stackoverflow.com/a/42010001/1040605
function mycustom_title($teetitle) {
$teetitle = 'My Custom Title Here';
return $teetitle;
}
?>
<body>
<div id="content" role="main"> <p>
<?php
// wp_title gives my custom title as I wish
echo wp_title();
searchForm();?>
</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment