In my index page I have this code to exclude a category (e.g. Breaking News) which is ID #5:
<?php
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts("cat=-5"); ?>
I want to offer user to be able to enter the cat ID from the admin theme option. In my 'theme-options-init' file I have this :
$options[] = array( "name" => "Exclude Breaking News ID",
"desc" => "Enter the id of Breaking News here. example:5",
"id" => $shortname."_bn_id",
"std" => "",
"type" => "text");
My problem is that what I should insert in here:
query_posts("cat=-5");
I tried something like this but it breaks my theme.
query_posts("cat=-<?php echo get_option('alsd_bn_id'); ?>");
Can a kind soul tells me what I did wrong? Thanks