Adding Event Manager to a custom search
-
Hi
I am currently using a PremiumPress theme on my site which I have recently discovered does not automatically include Event Manager listsings as part of its search. So I tried to add a search plugin but the theme does not like that either. However I have found a section in the themes class_search.php which says you can add a custom field to your search, but I don’t have a clue where to find the info required.
Here’s the code:
/**
* Builds an custom field area for search form builder
*
* @param null|object $data
*/
function custom_field( $data = null ) {global $CORE;
$label = ”;
$meta_key = ”;
$link_key = ”;
$field_type = ”;
$values = ”;
$data_type = ”;
$compare = ”;
$operator = ”;
$help = ”;
$alias = ”;if ( !is_null( $data ) ) {
$label = $data->label;
$meta_key = $data->key;
$field_type = $data->field_type;
$link_key = $data->link;
$values = $data->values;
$operator = $data->operator;
$compare = $data->compare;
$help = $data->description;
$alias = $data->alias;
}$style = ($field_type == ‘select’) ? ‘block’ : ‘none’;
?>
<li class=”postbox closed”>
<div title=”Click to toggle” class=”handlediv”></div>
<h3 class=”hndle”>
<span class=”label label-important”>Remove Field</span> // <span class=”label label-success”>Custom Field</span><span>
<?php
if ( !empty( $label ) ) {
echo ‘ – ‘ . $label;
}
?></span>
</h3>
<div class=”inside”>If anyone knows how to fill this or can offer any advise in it would really really be appreciated.
Much thanks
Val
The topic ‘Adding Event Manager to a custom search’ is closed to new replies.