Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

senyoraangelica on "Cant get php to work inside shortcode content"

$
0
0

I tried several solutions from looking at similar questions within the site but it won't work me. =( Please help.

This is an excerpt from my original code:

<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>

Basically, I want my checkboxes to remain checked, if they were checked before hitting submit. Unfortunately, it's been hours and I can't get the php to work inside the shortcode.

Please help.


Viewing all articles
Browse latest Browse all 8245

Trending Articles