[wp-hackers] Front Page Displays - WordPress 2.5

Aaron Harun admin at anthologyoi.com
Sun Apr 6 16:20:03 GMT 2008

Here is some pseudo-code that should do what you want. All you have to
do is create a drop down list that you fill with page titles -- you
will want to clean the titles before using them -- and IDs. Later you
check to see if the current $id is the same as the one saved.


function admin(){
$pages = get_pages();

if ($_POST["mypage"]) {



<form method="post">

<select name="mypage">

<?php foreach($pages as $page){?>
<option value="<?php echo $page->ID"><?php echo $page->post_title;?></option>

<?php }?>

<input type="submit">


add_filter('the_content', filter);

function filter($content){
global $id;
$mypage = get_option('page_id_plugin_should_display_on');

if($id == $mypage){

$content .= 'Some cool feature';


return $content;


More information about the wp-hackers mailing list