Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Under Menu Search bar for v3.04

  1. #1
    Marketplace Seller ahikmahin's Avatar
    Join Date
    Aug 2010
    Location
    Australia
    Posts
    504
    Thanks
    32
    Thanked 52 Times in 42 Posts

    Thumbs up Under Menu Search bar for v3.04

    Ok guys... As our promise we decided to release our "Under menu Search bar" publicly free...

    Special Thanks to our Customers who bought this mod & help us to make it free to all others.

    Please Note: This mod only for v3.0.4 & we will not provide any support (except our customers)

    Thank you.

    Attached Files:
    indicator.gif , autocompleter.zip

    Instruction:
    1. Upload the autocompleter folder to wp-content/plugins folder
    2. make & Upload the widget-search.php file to classipress theme folder: wp-content/themes/classipress
    3. open functions.php from your classipress theme and add the line at the end: include_once 'widget-search.php';
    4. open header.php from your clssipress theme folder and add the line: <?php if( function_exists('custom_ajax_search') ) custom_ajax_search(); ?> just before the closing div tag: </div><!-- /header -->


    widget-search.php codes:

    PHP Code:
    <?php

    function custom_ajax_search()
    {
        
    ?>
        <div class="search-bar">

            <form action="<?php bloginfo('url'); ?>/" method="get" id="searchform" class="form_search">

                <input name="s" type="text" id="ss" value="<?php _e('What are you looking for?','cp'); ?>" onfocus="if (this.value == '<?php _e('What are you looking for?','cp'); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('What are you looking for?','cp'); ?>';}" class="editbox_search" /> in

                    <?php wp_dropdown_categories('show_option_all='.__('All Categories''cp').'&hierarchical=1&hide_empty=0&orderby=id&show_count=0&title_li=&use_desc_for_title=1&exclude_tree='.CP_BLOG_CAT_ID); ?> in 
                    <input name="where" type="text" id="sss" value="<?php _e('City or State','cp'); ?>" onfocus="if (this.value == '<?php _e('City or State','cp'); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('City or State','cp'); ?>';}" class="editbox_search" />

                <input type="submit" class="btn_orange" value="<?php _e('Search','cp')?>" title="Search" id="go" name="sa" />
            </form>

        </div><!-- search-bar -->
        <?php
    }

    function 
    custom_ajax_search_css()
    {
        
    ?>
        <style type="text/css">
        .search-bar{
            width: 920px;
            margin: 0 auto;
            display: block;
            background: #7DA741;
            padding: 10px;
        }
        .search-bar .form_search input#ss {
            border:1px solid #BBBBBB;
            color:#4F4F4F;
            padding:6px;
            width: 218px;
        }
        .search-bar .form_search input#sss {
            border:1px solid #BBBBBB;
            color:#4F4F4F;
            padding:6px;
            width: 125px;
        }
        </style>
        <?php
    }
    add_action('wp_head''custom_ajax_search_css');

    function 
    custom_search_where_city($where)
    {
        global 
    $wpdb;

        if (
    is_search() && isset($_GET['where'])) {

            if( !empty(
    $_GET['where']) )
            {
                
    $q $wpdb->escape($_GET['where']);
                
    $where " AND ( ($wpdb->postmeta.meta_key = 'cp_state' AND $wpdb->postmeta.meta_value = '$q' ) OR ($wpdb->postmeta.meta_key = 'cp_city' AND $wpdb->postmeta.meta_value = '$q' ) )";
            }
        }

        return 
    $where;
    }

    add_filter('posts_where''custom_search_where_city');

    ?>

    Design Instruction:
    add this line to your style.css file from the classipress theme folder and upload the attached indicator.gif file to the images folder of your theme.


    .ac_loading{
    background: #fff url("images/indicator.gif") no-repeat right center;
    }



    Enjoy !
    Attached Images Attached Images
    Attached Files Attached Files

  2. The Following 2 Users Say Thank You to ahikmahin For This Useful Post:

    Fanatic (November 28th, 2010), hanniabu (June 20th, 2011)

  3. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    36,749
    Thanks
    159
    Thanked 2,959 Times in 2,835 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  4. The Following User Says Thank You to jomarkosabel For This Useful Post:

    ahikmahin (November 20th, 2010)

  5. #3
    Marketplace Seller ahikmahin's Avatar
    Join Date
    Aug 2010
    Location
    Australia
    Posts
    504
    Thanks
    32
    Thanked 52 Times in 42 Posts

    Smile

    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #4
    Junior Member kk8ete's Avatar
    Join Date
    Feb 2010
    Posts
    47
    Thanks
    0
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  7. The Following User Says Thank You to kk8ete For This Useful Post:

    ahikmahin (November 21st, 2010)

  8. #5
    Senior Member aggieoutlaw8's Avatar
    Join Date
    Oct 2010
    Location
    United States
    Posts
    125
    Thanks
    0
    Thanked 6 Times in 6 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  9. #6
    Marketplace Seller ahikmahin's Avatar
    Join Date
    Aug 2010
    Location
    Australia
    Posts
    504
    Thanks
    32
    Thanked 52 Times in 42 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  10. #7
    Senior Member aggieoutlaw8's Avatar
    Join Date
    Oct 2010
    Location
    United States
    Posts
    125
    Thanks
    0
    Thanked 6 Times in 6 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  11. #8
    Junior Member kk8ete's Avatar
    Join Date
    Feb 2010
    Posts
    47
    Thanks
    0
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  12. #9
    Senior Member aggieoutlaw8's Avatar
    Join Date
    Oct 2010
    Location
    United States
    Posts
    125
    Thanks
    0
    Thanked 6 Times in 6 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  13. #10
    Member tyrone's Avatar
    Join Date
    Dec 2010
    Location
    South Africa
    Posts
    58
    Thanks
    7
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Using search plugin WP Custom Field Search
    By Unregistered in forum ClassiPress General Discussion
    Replies: 70
    Last Post: August 31st, 2011, 10:01 PM
  2. MAKE Search box always search in whole website instead of selecting categories
    By kittycat in forum ClassiPress General Discussion
    Replies: 2
    Last Post: October 18th, 2010, 02:56 PM
  3. [TUTORIAL] WP Custom Search messing up Google Adsense on search pages
    By mlanghorst in forum ClassiPress General Discussion
    Replies: 1
    Last Post: August 8th, 2010, 07:38 PM
  4. Replies: 1
    Last Post: July 25th, 2010, 09:17 AM