[wp-hackers] is it possible to change the_title halfway into the processing of a page/post?

Haluk Karamete halukkaramete at gmail.com
Mon Feb 13 21:22:22 UTC 2012


you may find it weird, actually very weird, but is the following possible>

load up a post or page into the admin panel and place something like
this in to the editor;

<?php

//assume exec-PHP already active

$current_page_url_here = get_current_url();

echo "<a href='{$current_page_url_here}?var1=val1'>click me</a>";

if ( $_GET['var1']=='val1' )
{
   //change the current post's html title to <title>val1</title>
without using javascript/jquery
}
?>

so when the visitor, clicks on the "click me", same page reloads but
this time, the title reads val1, and that's what search engines see
too.
and if it is also possible to change, the_title() to be equal to val1,
that's even better.

But, is such a thing technically possible? Or is it too late at that
time to make those changes?
Could ob_start in any shape or form be deployed here to achieve this goal?


More information about the wp-hackers mailing list