大家好,我正试图为我的第一个Wordpress模板创建一个高级控制面板,但我无法添加我需要的功能。我试图添加的功能是可以通过管理面板选择DIV的位置(左侧和底部)。(为我糟糕的英语向我道歉)
这是我函数中的代码。php
$shortname = appacqua
array( "name" => "Point on the map",
"type" => "section"),
array( "type" => "open"),
array( "name" => "Have I to activate zona 1?",
"desc" => "Select if you want to show the first zone",
"id" => $shortname."_zona1c",
"type" => "checkbox",
"std" => "false"),
array( "name" => "Zona 1",
"desc" => "Choose the position",
"id" => $shortname."_zona1x",
"type" => "text",
"std" => "Left:???"),
array( "type" => "close"),
我可以在我的管理面板中看到“box”,如果我回显$shortname,我对复选框没有任何问题。“\\u zona1x”它显示了数字,我唯一的问题是当我尝试将此添加到我的样式中时。css:.zona1{width:27px;height:27px;background:url(icone/1.png) no-repeat;position:absolute;bottom:0;left:<?php echo $appacqua_zona1x;?>px;}
它不起作用。。。如果我使用Google Chrome来显示元素,它会给我类似的东西:width: 27px;
height: 27px;
background: url(icone/1.png) no-repeat;
position: absolute;
bottom: 0;
left: <?php echo $appacqua_zona1x;?>px;
我做错了什么?非常感谢你的帮助。你知道有没有一种方法可以在控制面板(比如iFrame或类似的东西)中创建修改的预览。
假设我是一个“白手起家的程序员”:P所以请写“慢慢来”(lol),对我好一点,非常感谢!