我嘗試了幾種解決方案,從網站中查看類似的問題,但它不起作用。 =(請幫助不能讓php在短代碼內容中工作
這是我原來的代碼的摘錄:
<form action="" method="get">
<input type="text" name="search" value="">
<input type="submit" value="Search">
<?php echo do_shortcode('[expand]
<input type="checkbox" name="title" <?php if(isset($_GET['title'])) echo "checked='checked'"; ?>>
<label for="ti">Title</label></td>
[/expand]'); ?>
</form>
基本上,我希望我的複選框保持選中狀態,如果他們點擊提交不幸的是,它一直小時,我前檢查。不能讓PHP的簡碼內工作。
請幫助。
你需要你的時候它是有一次,在你的do_shortcode FUNC再次打開<?PHP的? –