Advertisement:

Author Topic: Show custom field in main page  (Read 1271 times)

Roberto

  • Newbie
  • *
  • Posts: 46
Show custom field in main page
« on: December 01, 2013, 12:35:13 pm »
Hello!  I'm trying to show and make filterable search by custom field in main.php but with no success! Anybody can help me?
Another question : i see that in search sidebar custom field not appear by default, but after first search... how can i make them visibile by default?
« Last Edit: December 01, 2013, 12:45:33 pm by faustovalsecchi »

Roberto

  • Newbie
  • *
  • Posts: 46
Re: Show custom field in main page
« Reply #1 on: December 01, 2013, 04:30:35 pm »
I'm trying to customize this piece of code in search.php (modern theme):
Code: [Select]
</fieldset>
                        <?php
                            
if(osc_search_category_id()) {
                                
osc_run_hook('search_form'osc_search_category_id());//this call the custom field when categories checkbox is selected, how can i pass the categories?
                            
} else {
                                
osc_run_hook('search_form');
                            }
                        
?>

                        <button type="submit"><?php _e('Apply''modern'); ?></button>

Any help? I think that i can show custom field by passing the categories id...

Dincer AL

  • Full Member
  • ***
  • Posts: 106
  • http://tolter.com
Re: Show custom field in main page
« Reply #2 on: December 07, 2013, 01:52:31 pm »
I can help you for you price $100