Use the following way:
<?php
echo do_shortcode('[cftsearch]');
?>
Perfect, but I have another question – I have used sort=menu_order and orderby=ASC which works find, unless I use the cftsearch.
Picking through the code I found that if I changed $_REQUEST[‘order’] = DESC to ASC in this part of your plugin:
function custom_field_template_posts_orderby($sql) {
global $wpdb;
if ( empty($_REQUEST['order']) || ((strtoupper($_REQUEST['order']) != 'ASC') && (strtoupper($_REQUEST['order']) != 'DESC')) )
$_REQUEST['order'] = 'DESC';
Then I get ASC order, so what do I need to do to NOT change your code, but satisfy the conditional statement so I get the ASC order I want?
BTW, there is a mismatched </p> tag on line 3229 causing validation failure, I simply deleted it.
Ok I figured it out. First I don’t need ASC anymore because I re-ordered my posts when I found that the next-post and last-post links were working backwards, but I still needed to impose orderby=menu_order.
For normal post listing and search I have added orderby=menu_order to the query string right before “theloop” but what I didn’t know was how to add it to the CFTSEARCH.
Turns out it’s easy. All I had to do was add:
<input type="hidden" name="orderby" value="menu_order" />
to the “FORMAT” I was using for the search form.